A direct object answers the question 'what?'.
An indirect object answers the question 'for what?' or 'for/to whom?'.
Example:
Squidward played the clarinet for Spongebob.
Clarinet is the direct object. It answers the question 'What did Squidward play?'
Spongebob is the indirect object. It answers the question 'For whom did Squidward play?'