A bird just sitting on a wire doesn't touch the ground, or anything in contact with the ground, so electricity stays in the power line. However, if a bird were to touch a power line as well as equipment or other metal that is grounded, it could potentially give electricity a path to the ground and the bird could be shocked.
When a bird is perched on a single wire, its two feet are at the same electrical potential, so the electrons in the wires have no motivation to travel through the bird’s body. No moving electrons means no electric current. The bird is safe, however if that bird stretches out a wing or a leg and touches a second wire, especially one with a different electrical potential, it will open a path for the electrons — right through the bird’s body.
Power lines carry alternating currents or AC where the electric current regularly changes direction. Over time the voltage alternates between positive and negative indicating the direction of voltage flow. Voltage is the difference in charge between two points, whilst current, measured in amperes, or amps, is the rate at which the charge is flowing. The number of cycles per second is measured in Hertz (Hz) and average power lines have a frequency of 50 Hz. Because the voltage in the wire is constantly changing, the voltage of a bird sitting on a wire is also changing. In other words, the bird is constantly being charged and discharged through its feet.
The other thing we need to think about is the capacitance of the bird. This is the ability of the bird to collect and store electric charge. Because birds are very small and shaped a bit like spheres, they can’t store much electric charge. In fact, when a bird sits on a 50 Hz power line it can only carry a current in the order of microamps (μA), or 0.00000001 amps.
So although the bird does have a current running through its body, it is too small to electrocute it or even give it an electric shock. For comparison, a current of about 10 milliamps (0.01 amp) is enough to produce a painful shock in humans, and electrocution is possible from about 50 milliamps. We don’t know whether birds perched on power lines can feel the current going through their bodies. Perhaps they enjoy the buzzing sensation that they may be feeling and perhaps this explains why you don’t often see big birds, with a larger capacity, sitting on power lines.
A bird is also made of cells and tissues. These cells and tissues do not provide the electricity in the wire with an easier route to travel than the one it is already on. Because a bird's body is not a good conductor of electricity, the electricity essentially ignores the bird on the wire and continues to travel along the copper wiring to its destination. In fact, humans would also be able to not be shocked by a power line if we hung suspended from the power line with both of our hands on the line and no other grounding objects around us.