So are altered chords a chord that have a major 3, a flat 7, a sharp or flat 5, and a sharp or flat 9? Also, how do you determine which sharps or flats to use? Do you just decide that by what is being called for in the song?
An altered chord is a dominant chord that has altered chord tones/extensions. If it doesn't specify (like if it just says C7alt), then add whatever extensions you want. If you're reading from a fake book or something, you might be able to steal some alterations from the melody, but if there's no context, just do whatever you feel fits.
^^^^Yep - Dominant chords, for color.
Generally speaking, it implies b9, #9, b5, #5. The description of "altered" goes hand in hand with the altered scale, which can also be described as the seventh mode of the melodic minor. In other words, over a G7alt you would use the notes of an Ab melodic minor scale. The G altered scale is G Ab Bb Cb(B) Db Eb F, which gives you the b9, #9, b5 and #5.