You don't HAVE to do any kind of training, but the more you train, the more muscle you'll put on or keep on, the healthier you will be, and the better your shape will be. Any kind of training works, but at least 2-3 sessions of weight training per week are recommended for best results.
If you’re dieting to lose fat OR gain muscle, high volume weight training is the best approach for either losing fat without losing muscle, or adding muscle without too much fat. If you’re doing sport training during these phases, backing off on that training a bit and adding a bit more physique training (plenty of sets and reps so long as you can recover) might be a good idea. If you’d like some guidance on training, please check out the following products: