It is a little complicated and requires some knowledge of electronics to explain how it works.
If you are using an ideal source with no output impedance or distortion, plugging in a second headphone will have no effect on the first. The second headphone will just draw extra current/power from the source, independent of what the first headphone is doing, so each headphone will be as loud and sound the same as it would if it were the only one plugged in.
In reality there are no ideal source components. The extra current draw caused by the second headphone will cause additional voltage drop on the source's output impedance. That means that plugging in the second headphone will make the first headphone slightly quieter. Because the headphone's are (typically) reactive loads, the frequency response of each headphone will be altered by the impedance curve of the other. The extra current/power draw will also cause the source to distort more. Also, the distortion created by each headphone's driver can feed back to the source and affect the other headphone. All of these problems are made worse by a source with higher output impedance.
In short, you need a headphone output with very low output impedance and double the power you would normally need, otherwise the sound quality and volume will be significantly reduced. Driving two headphones from one source is not recommended if sound quality is important.
If you have a Y-splitter and a couple of headphones you could try it out for yourself. Plug one headphone into the splitter. While listening to something in the first headphone, plug in the second headphone and hear how the sound in the first headphone changes.