This textbook presents the basics of philosophy that are necessary for the student and researcher in science in order to better understand scientific work. The approach is not historical but formative: tools for semantical analysis, ontology of science, epistemology, and scientific ethics are presented in a formal and direct way. The book has two parts: one with the general theory and a second part with application to some problems such as the interpretation of quantum mechanics, the nature of mathematics, and the ontology of spacetime. The book addresses questions such as "What is meaning?", "What is truth?", "What are truth criteria in science?", "What is a theory?", "What is a model?" "What is a datum?", "What is information?", "What does it mean to understand something?", "What is space?", "What is time?", "How are these concepts articulated in science?" "What are values?" "What are the limits of science?", and many more. The philosophical views presented are "scientific" in the sense that they are informed by current science, they are relevant for scientific research, and the method adopted uses the hypothetical-deductive approach that is characteristic of science. The results and conclusions, as any scientific conclusion, are open to revision in the light of future advances. Hence, this philosophical approach opposes to dogmatic philosophy. Supported by end-of-chapter summaries and a list of special symbols used, the material will be of interest for students and researchers in both science and philosophy. The second part will appeal to physicists and mathematicians.