Request a PAC from your current network by texting PAC to 65075, and give your PAC to your new network.
If you're switching networks and want to keep your mobile number, you'll need a PAC. To request one, simply text PAC to 65075. You should get a response within 60 seconds.
Once you've taken out a new contract with the network you're switching to, contact your new network and give them your PAC. They'll take care of the rest, porting your existing number over to your new contract (typically within 24 hours), and automatically cancelling your old contract.
Note: If your current contract hasn't expired, you may be asked to pay an Early Termination Fee to switch to a new network.