The metaphysical idea that reality exists independently of one's mind and yet can be known is called realism. The metaphysical idea that no mind-independent reality exists or can be known is idealism. These are two main battlegrounds of metaphysics.
By the 4th century AD in Alexandria, Egypt, alchemy was starting its transformation into chemistry. The conventional view is that alchemy was steeped in mysticism, and that chemistry did not quite become what we would call science until it entered the 19th century.
In the early 17th century, Galileo introduced to physics his experiments with earthly objects: the dawn of empirical science in Western Europe. Galilean laws of motion led to the overthrow of Aristotle's ideas, a revolution more or less completed by the wide acceptance of Cartesian physics, built upon Copernican and Galilean mechanics.
Newtonian physics rapidly replaced Cartesian physics. Isaac Newton, like others that we now call scientists, was known as a natural philosopher. In the 1830s, Auguste Comte created positivism, the first modern philosophy of science. It sought the divorce of science from religion and metaphysics.
In 1847, Hermann von Helmholtz's paper "On the conservation of energy", stated the first law of thermodynamics, and tried to reduce physiology to physics. In 1859, Darwin proposed an explanation of evolution by natural selection. Both seemed plausible and compatible with physical theory.
By the 1860s, the term science (as meaning something distinct from philosophy) entered the dictionary. Today the term metaphysics usually refers to discussion of aspects of reality which are beyond physics. Particularly among those seeking to be scientific, the term metaphysics can be pejorative to varying degrees. However, philosophers of science recognize that science is impossible without metaphysics. At the very least, before beginning empirical investigation, one needs an ontology. This is because categories are needed to sort observations into.