note form
halogenalkanes have polar bonds because the halogens are more electronegative than carbon atoms, partial positive is in the carbon atom and partial negative is in the halogen atom. Meaning the halogen atom will attract the pair of electrons more strongly.
Nucleophiles are species that positive liking that contains a lone pair of electrons, they are atttracted to positive delta molecules.
Most common molecules are like
CN:-
:NH3
-:OH
To show that they are nucleophiles, they must have a lone pair of electrons show by drawing two dots and a negative sign.
A nucleophilic substitution is a type of reaction mechanism that shows how the nucleophilic moles attack the halogen alkanes. Nucleophilic substitution reaction mechanism can produce either amines or alcohols.

in this image above, we can see that the carbon is partial positive and the chlorine is partial negative. Thereore the C-Cl bond is a polar bond. The curly arrow from OH- to C atom, the LONE PAIR of the OH- is pointed directly to the positive delta carbon atom. The lone pairs is given to the positive partial carbon atom. The second arrows from the middle of the C-Cl bond to the Cl shows both electrons from the covalent bond move entirely onto the chlorine atom, causing it to leave a a chlorine ion.

In this image above, the nitrogen in ammonia has a lone pair of electrons and is the nucleophilic molecule. As we we can see a bromine atom is covalently bonded to a carbon atom, this creates a partial difference between the bromine (partial negative) and carbon (partial positive)