What the teacher is trying to get at is to not try and change your hypothesis after completing a lab to make it appear as if you were correct the entire time. The flip side of the coin is that some might cheat on the data to prove their hypothesis correct which screws up with people trying to use the research/lab as evidence for claims.
You probably haven't taken Biology yet but an example of a hypothesis proven wrong was George Cuvier. He noticed that when examining fossils (sediment rock) and the layers of strata, that different species disappeared and appeared. He theorized that this was caused by catastrophism, the idea that there was basically a small local catastrophe which wiped out the population of species. He theorized that other species from different regions migrated to that area, and repopulated it.
This was proven wrong though. The real reason for this was natural selection and evolution, see Charles Darwin. Cuvier still provided a basis though for other scientists to provide their own theories.
Another good example is in psychology: Sigmund Freud. His theories on psychoanalysis were later proven wrong, but he still is regarded as an important contributor of psychology. Many psychologists were led to create new theories off of his.