Genjutsu is one of shinobi´s 3 ways of fighting(ninjutsu,genjutsu,taijutsu), it works by flowing your chakra into the opponent thereby effectively disturbing their chakra flow and manipulate the 5 senses to put them in an illusion. It´s useful because with this, even strong opponents(physically) can be beaten when their senses are controlled because we all rely on our 5 senses which is how we take in information and perceive the world, any untrained shinobi of the mind is vulnerable to a genjutsu user.