You can easily determine if your car battery is bad by performing a couple of different tests on it yourself.
When you least expect it the last sound you want to hear is the tick-tick-tick of a car that has a dead battery. When you turn the key instead of the usual sounds of the car turning over and firing you'll sometimes hear a ticking sound and that's it. In some cases you won't even get that. You'll turn the key and there's nothing. Trouble shoot by checking the water level in the battery and scraping any corrosion from the battery posts. Also remove corrosion from the battery cables. In mild scenarios the battery cable can simply come loose and keep the battery from starting the car. When the cables are loose a screwdriver is usually all you need to be on your way. Simply tighten the cables up on the posts and the car will generally start. Another possibility is that an overhead light got left on all night and ran the battery dead. Try putting a charge on the battery to see if there are future problems or not.
It's a good idea to carry a jumpstart kit in the trunk of your car for just this sort of situation. The kit allows you to plug into the lighter and get enough juice to jumpstart the car. Or, keep a battery charger handy. It can be plugged into a 110 outlet and will recharge the car's battery. It takes some time to charge the battery - sometimes several hours.
A hint that the battery could be going bad is that it will stay charged throughout the day while turning it on and off but when using extra power, such as headlights, the car seems to drag when starting. If the car ran fine but refuses to start after using headlights for awhile it could mean that the battery needs replaced.
Another way to determine if your battery is bad is to check the alternator. To do this, start the car then remove the ground cable from the battery. If the car immediately dies this points to a bad alternator rather than a battery gone bad. One other way to test your battery is to place it in a different car to see if it will start. If the car starts and will run for awhile with lights and radio running, the battery is good. If the juice drains rapidly from the battery while running for a short while the battery needs replaced.
Many places that sell car parts will test the battery for you free. They will also sell you a new battery and often install it for you.
