A hypothesis is an attempt to explain phenomena. It is a proposal, a guess used to understand and/or predict something. A theory is the result of testing a hypothesis and developing an explanation that is assumed to be true about something. A theory replaces the hypothesis after testing confirms the hypothesis or the hypothesis is modified and tested again until predictable results occur.
So, a person might make an observation and immediately form a hypothesis about why something happens the way it does. He or she then tests the hypothesis, modifies it if necessary, and eventually develops a theory. The hypothesis might change significantly as testing occurs. A hypothesis can be right or wrong, but a theory is supposed to be true based upon the scientific method. So, when a hypothesis has been verified to be true, it becomes a theory.