Here's why:
* Direct Object: The direct object is what is being acted upon. In this case, it's corn. American Indians showed settlers how to plant *corn*.
* Indirect Object: The indirect object is the person or thing that receives the direct object. The settlers received the knowledge of how to plant corn.
You can often identify the indirect object by asking "to whom?" or "for whom?" the action is done. In this case, you could ask "American Indians showed *to whom* how to plant corn?" The answer is "settlers".