Maxwell only appears a few times throughout the game excepting when you play as him. He will appear each time you enter a new world and encourage you to find something to eat before night comes. He will also appear each time you enter a new world in Adventure Mode. Finally, you'll meet up with him at the end of your adventure and this is the only time that you can attack him.
To unlock Maxwell as a playable character, you need to complete Advnture Mode. For more information on how to beat it, see the walkthrough section.