Call The Track
The first step in your ticket search should be to call the track ticket office and see if they have any tickets for sale. This is the safest (you know your tickets are not counterfeit) and usually the cheapest way to buy tickets. You can find a complete list of Sprint Cup race tracks on this site.
If you've never been to the track before tell the person that. I've often found that they will offer to include maps, local hotel information, and even tips on the best ways to get in and out of the track so as to help avoid the traffic.
And finally, When you are talking to the ticket person be nice. By being friendly you will get the best available tickets and the best service. If you are rude and obnoxious on the phone you might find yourself sitting behind a post.
Surf The Web
So you called the track and they are sold out? Don't despair yet. The internet is full of friendly race fans and many of them have tickets that they aren't using. There is a list of sites with a strict no scalpers rule where you can find a spare ticket or post a request for one here.
Be careful. Most race fans are really great folks who just might have an extra ticket. Unfortunately, there have been rare instances where someone printed up something that looked like a valid ticket but wasn't. The buyer never knows that there is a problem until they are at the gate and the ticket taker stops them.