A faulty spoke might break anywhere. If an otherwise undamaged spoke has snapped at the thread or in the straight section between rim and hub, it was probably faulty. A faulty or damaged spoke should simply be replaced.
How often should you check spokes?
You can do a quick check by plucking the spokes like a string. They should all have a nice high note. You should have them trued and tensioned about once a year if you ride often. To be honest I don't check every ride, especially since I got disc brakes.
How much does it cost to replace bike spokes?
Spokes are usually $1.00 - $2.00 each. Any shop will sell individual spokes. Labor to replace a spoke is $10 - $20 depending on your location.