Here are the basics.
SN2 and E2 reactions occur in one step. As the leaving group exits the molecule, the nucleophile attaches to the molecule. What you typically see is backside attack for SN2 molecules meaning you have inversion of stereochemistry or the nucleophile attaches to the side opposite of the leaving group. You typically see SN2 and E2 reactions occur in molecules that are not sterically hindered. For example, if you have a t-butyl group blocking the backside it is very hard for the nucleophile to attack the nucleous this way.
E1 and SN1 reactions occur in a two-step process, via a carbo cation formation. In these reactions, the leaving group leaves first and you have a carbon atom with a positve charge on it (the leaving group stole the electrons). So the nucleophile will attack the C+ ion. When looking at the SN1 product, you will notice there is retention of starting product and the inversion of product (if these are equal it is a racemic mixture). The reason why this occurs is because after the carbocation ion forms, the nucleophile can attack from either side of the positive charge easily so it is a coin flip.
If you have to distinguish between SN2 or SN1 reactions or E2 and E1 reactions you should look at the compound. If it is sterically hindered it probably goes via SN1 or E1. If it isn't sterically hindered and you have inversion of stereochemistry it is an SN2 or E2 reaction.
If you have rearrangement, this occurs only in SN1 or E1 reaction mechanisms, so that is the big tip off. You will have rearrangement of the carbocation to a more sterically hindered carbon atom because the + charge is dispersed among additional carbons atoms (look at resonance structures).
The other thing to understand is when you have competing substitution vs. elimination reactions, which are typically decided based on conditions or reactants. Make sure you read on that.