The simplest answer is that philosophy is concerned with questions of why whereas science is concerned with questions of how. In other words, if I ask “How do we convert coal to energy?”, that is a science question, but if I ask “Why do we convert coal to energy?” and ”Should we convert coal to energy?” then I am starting to enter the realm of philosophy.
At one time all that we think of as science today was considered a part of philosophy, which encompassed all pursuits aimed at gaining, increasing or using knowledge and wisdom. Today, however, the two often seem very far apart.
Over the years there have been many different proposals about how the gap between science and philosophy should be bridged. Some believe that philosophy should become more scientific. At one time, there was even a strain of thought that argued that philosophy should become subservient to science and concern itself only with asking questions about scientific methodologies! I side rather with those who say scientists should become more philosophical, and spend more time questioning the use the meaning and the larger implications of their experiments and discoveries.
We must also remember that every science is based in some philosophy –some viewpoint about the nature and purpose of the universe.