Lifting heavy weights has been shown to increase testosterone levels in males. Compound exercises such as squats, deadlifts, and bench presses are the best choices, as they have the greatest muscle recruitment and allow for the heaviest weights to be lifted. Honestly, it doesn't matter if you are lifting in a gym or just picking up heavy rocks in your backyard. Primal yelling during such things is to be encouraged.
In addition the boost in testosterone, weightlifting also promotes bone, joint and heart health. Weight lifting burns more calories than almost any form of exercise when performed at a high intensity, so this is critical for maintaining a ripped physique.