The reason is static electricity, i.e. the charge difference between differently-charged objects. The closer you bring two charged objects together, the force (or electric field) is stronger. Positive and negative charges attract and when they come too close the electric field becomes so strong that the air temporarily becomes an electrical conductor which is also known as dielectric breakdown. When this happens you can see a spark, which causes (enables) the two objects to exchange charge. A spark in air is triggered when the electric field strength exceeds ~3 kV/mm, which is the dielectric field strength of the air. It is the spark that actually hurts!
There are many different reasons why this happens but they all come down to charge buildup. When you rub two materials together, this causes a charge exchange between them. For example, when you walk around while wearing wool clothes, the charge builds up on your body and it becomes charged with respect to some other objects in the room. Dry conditions also contribute to charge buildup because air moisture content is a conductor over which any charge you build on your skin leaks away to the ground. Shoes with rubber or plastic soles is also an example of an insulator and contribute to the charge buildup.
I had similar issues with door handles in my previous workplace. The reason was the artificial grass carpet (plastic) on the floor which served as an insulator. As I walked on the carpet, the charge would buildup on my skin and as soon as I'd touched a door handle I would get shocked. The solution to this problem was to touch the handle with a metallic key first - there was still a spark, but now between the key and the handle. An exchange of charges does not hurt, the spark does!
If you really want to find the root cause for your friend's electric shocks, you need to start narrowing down possible causes. A very high chance is that this is an environmental problem - does your friend mostly get shocked in one particular place such as his home or workplace?