The philosophy of science is that branch of philosophy concerned with the nature of scientific inquiry. In its broadest form, its goal is to answer the question: "What is science?" Its subdisciplines, including Philosophy of physics, Philosophy of biology, Philosophy of psychology, aim to understand and help inform the conceptual underpinnings of their various branches of science.
In no way should philosophy of science be confused with Natural philosophy; the latter was the name given to what we would now call "science" through the end of the Enlightenment.
The philosophy of science comes on the scene following the development of the Vienna circle of philosophers. Encouraged by the recent successes in many areas of scientific inquiry, some of these philosophers made an effort to codify and define science.
Early efforts to codify scientific reasoning center around a principle of verification. The slogan would go something like this:
"A sentence is scientific if and only if it is verifiable; that is, if there is an empirical observation which can be made that supports that sentence."
Given this definition, the sentence "Hillary Clinton is wearing a pantsuit on 4 July 2008 at 3:55 PM" would be scientific, while the sentence "There is an undetectable unicorn in the yard right now" would not be.
Of course, this definition expands the range of science from the layperson's characterization of Serious Persons in Lab Coats, probably holding clipboards; but it is -- according to AJ Ayer -- a necessary condition for scientific validity.
An obvious objection is one formulated by Karl Popper: the doctrine of verificationism cannot be used to disallow theories whose projections are always verifiable. His chosen example is Freudian psychoanalysis. Popper claims that there is no behavior which cannot be explained by a Freudian theory. Now, on the one hand, this might seem like a good result: surely a theory that predicts everything in its bailiwick is a good theory! But Popper's point is actually more subtle than this: Freudian psychoanalysis predicts too much.