Before we get into actually talking about genjutsu and it's uses, we need to expand upon your knowledge in other places. Genjutsu works by altering your reality through the use of illusions and chakra but before you can learn about altering reality, you first have to understand your reality and surroundings first. Genjutsu manipulates one or more of your five senses and you need to have a strong sense of understanding of reality and your surroundings in order to know something is up and not right.
When you are placed inside a genjutsu, you must discover how it is just that, a genjutsu. People sometimes go into these long winded and pointless discussions on how they realize it's an illusion when you can notice small, simple things that can alarm you. Things that seem to happen suddenly and are unrealistic to the situation and scenario should be an alarming factor. Things like a Hozuki bio causing trees around to change should tip you off as well.
Recognizing is only half the battle, you must be able to counter it as well. Wasting time on long speeches on how you figure out may cost you the fight. In most cases, once you're placed under a genjutsu, you only have a few moments before another attack is sent your way. That means you have to reason very quickly and counter/defend against the genjutsu and then whatever jutsu may or may not be hurling towards you.
That being said, what all ways do you know of that can release one from a genjutsu? ^_^