Beer doesn't spoil in the sense that it becomes poisonous or disgusting. I've read in many places that nothing that can make you sick can live in beer due to the alcohol. It will eventually go stale and get a papery/cardboard flavor, or get sour and funky if you had an infection. But by all means give it a shot, don't just dump it!
Shelf life depends on storage conditions (colder is better), and how much oxygen got into the beer during brewing and bottling (less oxygen is better).