When someone shits, they have a bowel movement. It's a natural thing that happens after you eat.
Talking about shitting is usually private and not polite in many places.
Examples:
The baby shits in his diaper.
I need to go to the bathroom because I have to take a shit.
He shits every morning after breakfast.
The dog shits in the yard.
Sometimes when you eat too much candy, you get the shits.
She shits in the toilet because that's where you're supposed to do it.