GPS Code Phase usage
To make it simple, finding user location is done by using four pseudo-range measurements (approximative distance from user/receiver to satellite) to resolve a four unknown equation. As information, these unknown are receiver's (X,Y,Z) coordinates and it's clock offset.

These pseudo-range measurements are done by tracking stage of the receiver. Acquisition results (code phase and Doppler shift) are used to initialize delay and phase tracking loops. I let you the following simple explanation of the receiver behaviour : https://gssc.esa.int/navipedia/index.php/Generic_Receiver_Description 

Please let me know if my explanation are not sufficient,

Math