A nucleophilic attack is a chemical process by which an electron-rich atom or nucleus rapidly forms a new bond with an electron-poor atom or positive ion. Electron-rich atoms are strongly attracted to the nuclei of other atoms, which is why they are nucleophilic.
The nucleophilic attack is only one step of a reaction type called a nucleophilic substitution, by which functional groups can be interchanged on a molecule. There are two types of nucleophilic substitution reactions, which are called SN1 and SN2. The difference between these two reaction types has to do with when the nucleophilic attack occurs. In SN1 reactions, the nucleophilic attack is the second step, which occurs after the leaving group has been lost by the molecule undergoing substitution. In SN2 reactions, the removal of the leaving group and nucleophilic attack occur at the same time.
The different types of nucleophilic attacks also have different effects on the conformation of the molecule. In the case of an SN2 reaction, the nucleophilic attack must occur opposite the leaving group, and the conformation of the molecule flips. In an SN1 reaction, the nucleophilic attack can occur on either side of the molecule because the leaving group is lost before the attack happens.