how do you find the direct object in a sentcens?

The direct object answers what or whom after the verb.

The boy threw the ball.
What did he throw? He threw the ball.