It depends on what the music notation calls for. Typically you hold the chord down in order to "let it ring" throughout the bar (assuming that you're referring to whole notes) or until the next note. But if you're fingertips are getting really sore then, first of all, give them a break. When you go back to it, there's no reason that you need to hold the strings with your fretting hand throughout an entire bar. Just play the chord then lift your fingers so they just rest on top of the strings... at least for now. Just keep working on those calluses and you'll eventually be able to hold chords longer without pain.
It would be great if you specified exactly what music/lesson you are referring to. Are you working in Guitar Fundamentals? Or is it a song from the Songs Library? If so, which song?
"Whatever you are, be a good one" - Abraham Lincoln