What the heck is this conversion

If we react CH3CH2NH2 with HNO2 we get CH3CH2OH but how can we obtain CH3CH2Cl by reacting CH3CH2OH with P/Cl2?

If we react CH3CH2NH2 with HNO2 we get CH3CH2OH but how can we obtain CH3CH2Cl by reacting CH3CH2OH with P/Cl2?