when both the diene and the dienophile are cyclic compounds ,there are 2 theoretically possible products endo and exo.
the endo isomer is the one in which the double bond of the product and the unsaturated substituent of the dienophile portion are closest together in space..this is generally the preffered product .this is because the cyclic transition state of the diels alder reaction is more stabilised through secondary ∩ orbital overlaps for greater accumulation of double bonds in the endo product!
even when the dienophile is not cyclic but properly substituted, we can have endo and exo products as well ! but it is the endo product again which is preferred !