Gelding/Castrating Male Horses

Why and when should you geld or castrate a stallion, and what's involved in the procedure?