A sentence can be a group of words that communicate a complete thought, or it can be the punishment in a criminal case. Did your pen pal in prison write a sentence or two about the length of his sentence?
Actually, both meanings of sentence — words and punishment — are linked, coming from the Latin sententia, meaning "thought or judgment," derived from the verb sentire, "to feel or perceive." If you put some words before a period, you should give some thought to your sentence. If you receive a lengthy prison sentence, you will certainly feel it.