To slouch is to sit or stand with your shoulders hunched. Most people are more likely to slouch when they're tired or bored.
You might tend to slouch in math class but sit up straight and tall when your favorite art teacher invites you to enter a piece in an art show. Your math class posture can itself be described as a slouch as well. Yet another meaning of slouch is a person who's lazy or useless — this is actually the word's original definition, from the 1500's. It's thought to be rooted in the Old Norse word slokr, "lazy fellow."