He could try shouting for help so that people nearby might hear him and come to his rescue.
If there are some objects in the well, like rocks or debris, he might be able to stack them up to create a makeshift ladder to climb out. Also, he could look for any cracks or footholds in the well wall to climb. Another option is to wait for rainwater to rise in the well (if it's not too deep) and then float out using something that can act as a raft.
Well, first of all, he should stay calm. Panicking will only waste his energy. He can try to feel around the well for any ropes or vines that might be there. If he has a mobile phone with him, he can call for emergency services. In case there's a stream of water flowing into the well, he can follow the flow which might lead him to an exit or a wider part of the well from where he can find a way out.