A reaction will undergo E2 when one of the strong bases mebtioned in the destroyer somewjere are used. These bases include small unhindered ones such as CH3O- and CH3CH2O-. Bases like these will make the double bond on the inside because they are small and are able to get into the molecule. When the double bond forms on the inside(the more substituted alkene) it is known as the Zaitchev. However when a big bulky base such as terbutoxide- ([CH3]3O-) is used It is too sterically hindered to get inside and make the zaitchev. Therefore it will cut to the outside and make the less subtituted and less stable hoffman form. The E2 happens when you use one of the 5 bases mentioned in the destroyer. ( i forget the others offhand). If the halide is primary and you use one of the smaller cutting tools, it will compete with SN2. However a secondary or tertiary with the strong bases forms E2 always.
E1 occurs when you use a different base like KOH. If the halide is secondary or tertiary it will undergo an E1 elimination. Again if the halide is primary it will likely form a substitution.so be careful. Yu have to familiarize yourself with the laws of E/E1 and SN2/SN1. I would suggest first going through a textbook and reading the guidelines there carefully. It is impossible to teach the entire chapter in a single post.