Philosophy of science is what underlies science, what tells us how science should be done. Like any other domain of human knowledge, it evolves over time and can never be declared "perfect". Philosophy of science can be considered both a part of philosophy, because it is abstract and involves looking at the big picture in a certain way, and a part of science, because it incorporates experimental data about the effectiveness of different ways of doing and thinking about science. As such, it may be considered "meta-science" - science focused on science itself.
The scientific method, which is hundreds or perhaps even thousands of years old, was the first step on the road of stepping stones known as philosophy of science. The scientific method, among other things, consists of a sequence of key activities: observe, hypothesize, predict, experiment. This is a fine outline, but there is great disagreement on the details of each stage and where and how it is appropriate to apply them. Philosophy of science is meant to flesh out these details and test them empirically.
Many people have made important contributions to the philosophy of science. William of Ockham, a friar who lived in the 14th century, came up with what is today called Ockham's razor, which can be phrased in many ways, but the most popular is "entities should not be multiplied beyond necessity". Albert Einstein rephrased this as "make everything as simple as possible, but not simpler". Many centuries later, Ockham's razor was reformulated in a quantitative and mathematical way.
In the 1930s, Edward Sapir and Benjamin Whorf observed that different languages have different words for different objects, and the particular language we use biases the observations we make and the conclusions we draw from them. The genius of this observation was not really understood until the 70s, when many philosophers of science began to reference what became known as the Sapir-Whorf hypothesis. It became obvious that so-called "Whorfianism" could be extended to all areas of the scientific process - as humans, our brain works a certain way, and every aspect of it has the potential to slightly bias our observations. Like there are optical illusions that prey upon our imperfect perceptual systems to produce gross errors in judgment, there are cognitive illusions that testably produce beliefs that contradict fundamental laws in probability theory.
W.V. Quine, the great philosopher-logician of the mid-20th century, argued that for any given set of empirical facts, a near-infinity of theories can be cooked up to explain them, given enough side notes and addendums. So we can never know which theory is "correct" until we get more data. Karl Popper rejected this extremism and replaced it with his theory of falsifiability - for something to be science, it must have the potential to be refuted by further experimentation. This proved to be one of the most frequently cited contributions to philosophy of science.
All these incremental improvements may sound substantial, but the largest contribution ever made to the philosophy of science comes from the Reverend Thomas Bayes, an 18th century minister, and his intellectual heir, E.T. Jaynes, who died in 1998. Building off of a result in probability theory called Bayes' rule, Jaynes formalized the process of hypothesis formation based on precise mathematical foundations. This kickstarted the school known today as Bayesianism, which has become very popular in the physical and computer sciences and continues to grow in acceptance. Bayes' rule accepts subjectivism - that we can never know anything 100%, but with varying degrees of confidence, which can be precisely updated based on incoming evidence and prior probabilities.
Today, philosophy of science continues to evolve, being contributed to by scientists and philosophers alike.