Final answer:
When you get shocked by a doorknob, the spark is due to the transfer of electric charge through conduction. The shock is not harmful because the current is very small.
Step-by-step explanation:
When you get shocked by a doorknob, you are experiencing a spark of static electricity. This happens because of the transfer of electric charge, specifically through conduction. The excess electrons that you picked up from the carpet want to be as far away from each other as possible, so some of them move to the doorknob and distribute themselves over its outer surface.
This spark of static electricity may carry a few hundred watts of power, but you are not injured by it because the current is very small. Very small currents, like those from static electricity, pass harmlessly and unfelt through the body. The threshold of sensation for electrical shocks is only 1 mA, and shocks from currents less than 5 mA are apparently harmless. So even though you may feel the shock, it is not harmful or dangerous.