To train a pet rat to do tricks, you can use positive reinforcement techniques such as clicker training and rewards like treats. Start by teaching them simple tricks like targeting, then gradually move on to more complex tricks. Make sure to be patient, consistent, and use gentle handling to build trust with your pet rat during the training process. Remember to keep training sessions short and fun to keep your rat engaged and motivated.