In simplest terms, a hypothesis comes before a theory.
A hypothesis is an idea, a possible explanation of how or why something happens. When someone makes an assumption regarding the reason for an event, that assumption could also be called an hypothesis.
A scientific hypothesis has been developed into a statement that can be objectively tested. Applying the scientific method and collecting data from experiments may support or invalidate the hypothesis.
If, over a period of time, evidence accumulates from a variety of experiments that all support a particular scientific hypothesis, it will become a theory - a generally accepted explanation of the phenomenon under examination. A theory may change if new evidence is found to disprove the conclusion it supports, but the theory has more acceptance based on collected information and evidence than does a hypothesis.