Should you be running races as part of your training program?

We all love running races. The cameraderie, the meeting of friends, the buzz and vibe of the race. These are all factors for why we love racing. But should you be using races in your training plan as part of your build up to your goal race? Is there a place for that? And if so, how should you approach these races?