Why does indole undergo Diels Alder reaction?
It has a reactive double bond, and it is therefore a possible dienophile (one who loves dienes). The benzene ring's double bonds are off-limits though, because they are aromatic and well-stabilize via resonance throughout the benzene ring, so the indole is not a diene.
The Diels-Alder reaction is a [4+2]cycloaddition reaction, so the diene constitutes the "4", having a reactive carbon-1 and carbon-4, and the dienophile constitutes the "2", having a reactive carbon-1 and carbon-2.
A basic Diels-Alder mechanism looks like this:
where the conjugated diene must be s-cis for a reaction to occur. Otherwise, carbons 1 and 4 on the diene are too far apart to react in a concerted fashion.
And they're pretty much all like that (with heat), when the reactants are symmetrical or don't have any electron-withdrawing/donating groups.
The mechanism with an indole is just like any other Diels-Alder reaction, except you should consider whether the nitrogen is going to be electron-withdrawing or donating if the diene also has an electron-withdrawing group or electron-donating group.
The nitrogen, having a lone pair of electrons, is an electron donating group, because nitrogen already has an octet.
Therefore, the mechanism if, say, you wanted to react it with methyl vinyl ketone, is:
CHALLENGE: Can you draw the resonance structure of methyl vinyl ketone to show its charge distribution? Then, can you draw the Diels-Alder minor product, and THAT transition state?