You need to be more specific in your question as to what music you are thinking of when you question whether or not to repeat.
If in a sonta-allegro form, as Sonata in Fa dièse mentioned, you should take the repeat. Why? Because repetition of the main ideas ingrains it so that the rest of the movement can be better comprehended. If you do not repeat it, ideas will be lost and so will the rest of the movement.
If in binary form, like a Bach prélude from the Well-Tempered Clavier, it depends. It depends on whether you have learned how to take repeats. Taking a repeat in such a form requires much musical skill. You do not want to take it again in a manner that adds absolutely nothing to the music other than a tautalogy for extended time.
If in a theme and variation form, like Beethoven's God Save the Queen, you can choose to take the repeats or not in some of the variations. There are some variations that must be repeated because it reinforces certain ideas that will later be used. Other variations may not need to be repeated perhaps because it is not so much a interesting variation or because it does little except as a transitionary variation into a more interesting one. In God Save the Queen, it was written in a manner that allows for interpretive freedom which means you can add embellishments, both melodic and rhythmic.
Much of Baroque period music was written in a manner that allowed for much embellishments. If you repeated it the same way, it would sound... repetitive.
I would question very much your teacher who says to ignore them all. I can't possibly believe that is what he actually thinks, unless you are at a University and taking the repeats takes too much time. In which case, your teacher is still wrong but professors do not want to hear certain music repeated over and over many times each semester - they just want to hear it and give you a grade.
I think this type of instruction, not taking the repeats, is most unmusical and it hinders musical development. I had severe difficulty learnind a very easy Haydn sonata (Hob.XVI/12 in A dur) because I was not able to hear the music in my head because I was told not to take the repeat - it did not make musical sense to me.
Learn to take repeats.