A verbal or mathematical statement that summarizes the relationship between variables in nature or defines (but does not explain) how anything in nature functions is known as a scientific law or law of nature.
A mathematical example is Boyle’s law, which relates gas volume, temperature, and pressure; we use Boyle’s law not just in rocket science, automotive engineering, and college physics labs, but in my field, in explaining respiratory physiology (pulmonary ventilation).
Some other mathematical examples are Ohm’s law of electricity (relevant to nerve signal conduction), Poiseuille’s law relating fluid flow to pressure and and resistance (used in study of blood circulation and respiratory airflow), Mendel’s law of independent assortment, and other gas laws that we use not only in physics but to describe the physiology of respiration: Charles’s, Dalton’s, and Henry’s laws, which relate gas volumes, pressures, temperatures, and partial pressures and gas behavior at the air-water interface, as in the lungs.
A verbal example is from genetics, the law of complementary base pairing in DNA: adenine pairs with thymine and cytosine pairs with guanine in the DNA base pairs. Hence, the base sequence of one strand determines the base sequence of the other.
Notice that neither of those laws explains why those relationships are true; a law is just a description of the relationships that exist, from which we can predict the behavior of nature.
A scientific theory, on the other hand, is a statement or series of statements that summarizes what we know about how something works, based on a large body of facts, laws, and confirmed hypotheses. It is not a mere speculation, but an interpretive summary of a body of observations, often made by many, many scientists in different labs and over a long period of time. Some examples of scientific theories are the theory of plate tectonics, cell theory, the fluid-moasic theory of cell membranes, the Hardy-Weinberg theory of population genetics, the sliding filament theory of muscle contraction, and the theory of natural selection.
Notice that unlike laws, theories explain the how or why of nature—our best understanding of why nature behaves as it does. A theory is more factual than a fact, because any theory is based on many, many facts, not just one.
Thanks,
Eddie