Genjutsu is basically illusionary arts. It involves deceiving a target's brain about reality by messing with his senses. Genjutsu can be activated via any of a person's sensory interactions. This is ironic because our sensory organs are ideally supposed to make us know what is happening so we can react to it. When affected by genjutsu, a person's sensory network relays wrong details about reality, making the individual susceptible to the harsh elements of the real reality.
Generally genjutsu itself doesn't cause much physical damage on a target. It mostly relies on the target reacting wrongly to what happens in the real world because of what his senses tell him. Nonetheless genjutsus have been seen to cause paralysis and mental damage because of their strain on the mind. Because genjutsu is based on fake sensory deductions, it can be dispelled by introducing a real factor to one's body. What works most efficiently is pain. The degree of pain needed to dispel a genjutsu is proportional to the severity of the technique.
Although genjutsu afflicts a target physically its main point of contact is the target's chakra system. This is a feature common to all genjutsus. In order for said illusions/deceptions to be generated, the caster uses his chakra to disturb the "castee's" chakra network. As such, genjutsu can be dispelled by techniques made to return the chakra network to its original state eg. Kai.
Detecting genjutsu is a rather difficult feat if one does not possess a dojutsu or other sensory abilities due to the fact that it occurs internally. If one can see his chakra network and recognize that it's abnormal, then he can dispel it. On the other hand a person who can't see internally would have to deduce that he is in one by some sort of clever reasoning.
Sharingan genjutsu, one of the most powerful kinds, is a totally different topic altogether. They are so OP that they can exert control on a target's body, making him totally unaware of his actions. Another group known for its genjutsu prowess is the Kurama clan. Their abilities allow them to bring any genjutsu performed into reality, literally, bringing an opponent's nightmares into reality.