The answer to #1 is, it depends. This fits in nicely with your other question about why your tank doesn't shrink - recommend you go back and read that to refresh the physics in your mind. Recall that under water, the regulator will deliver air at whatever the surrounding pressure is, which means that the air pressure in the diver's lungs is the same as the surrounding water pressure. It's still air though, which as others stated above is 78% (roughly 80%) nitrogen.When you breathe in air as you go deeper, nitrogen will dissolve and enter your body tissue. As you ascend, the nitrogen will leave your body tissue which you expel as you exhale. In the PADI online course and in some videos on YouTube, there is talk about excess nitrogen.
1. When does this excess nitrogen form, while descending or ascending?
2. How does this excess nitrogen form?
As @tbone1004 stated above, Dalton's Law of Partial Pressures says that the total pressure of a gas mix is the sum of the partial pressures of the gases in that mix.
Air is a gas mix that's made up of 78% nitrogen, 21% oxygen, and 1% other gases, mainly CO2 and argon. So, in air, 78% of the total pressure is caused by nitrogen, 21% is caused by oxygen, and 1% is caused by those other gases. At 1 atmosphere absolute (sea level), the partial pressure of nitrogen in air is 78% of 1, or 0.78 atmospheres absolute. At 33 feet, the total pressure is 2 atmospheres absolute, so the pressure in the diver's lungs will be the same - 2 atmospheres absolute. Now, the partial pressure of nitrogen in the diver's lungs is 78% of 2 atmospheres absolute, or 1.56 ATA. The percentage of gases in the mix (air) does not change, but the partial pressure does. This increases linearly as the diver goes deeper: at 66 feet/3 ATA, the partial pressure of nitrogen in the lungs is 78% of 3, or 2.34 ATA. At 99 feet, it's 78% of 4 ATA, or 3.12 ATA. If you know the percentage of gas in the mix, you can calculate the partial pressure of that gas in the diver's lungs at any depth.
This is where Henry's Law starts to work. Henry's Law states that the amount of gas that will dissolve in a liquid is directly proportional to the partial pressure of that gas on the liquid. In @OTF 's soda bottle example, the gas/liquid interface is at the surface of the soda, and the force that keeps the CO2 dissolved is the partial pressure of CO2 acting directly on the surface of the soda.
In a diver's body, the gas/liquid interface is in the lungs. There are two very thin layers of tissue between the gas in the lungs and the blood in the body, and gas molecules can pass freely across those layers.
Our bodies are in equilibrium with the surrounding air right now, i.e. because there's 0.78 ATA of nitrogen pressure in our lungs, there's roughly 0.78 ATA of nitrogen dissolved in our bodies. As the pressure increases in the lungs with diving (remember what diving gear does for you), the partial pressures of the gases in the lungs increase, which creates a gradient between the gas pressures in our lungs and the gas that's dissolved in our bodies. The nitrogen will follow that gradient and begin to dissolve into the body via the lungs - first into the blood stream, then into the tissues supplied by the blood. This doesn't happen instantaneously - it's dependent on the pressure gradient and the rate at which the different tissues absorb and release nitrogen. The higher the partial pressure of nitrogen in the lungs (i.e. the deeper the diver goes) and the longer the diver stays down, the more nitrogen will become dissolved in the body via the lungs. So, the first part of question 1 is, on descent and at the bottom, the excess nitrogen is in the lungs. This also speaks to question 2 - how does this excess nitrogen form?
When a diver begins to ascend at the end of a dive, the pressure of gas in the lungs decreases. Critical to understanding decompression (and this is slightly simplified) is that at some point on ascent, the pressure of the dissolved nitrogen in the body will be greater than the partial pressure of nitrogen in the lungs. At that point, the pressure gradient reverses. Instead of going from the lungs into the body, it's going from the body into the lungs. The art and science of decompression involves controlling that pressure gradient so that the diver doesn't develop symptomatic bubbles (i.e. decompression sickness). That's the other half of the answer to question 1 - on ascent, the excess nitrogen is dissolved in the blood and body tissues, and it's our task as divers to release that excess nitrogen safely via our lungs - in a recreational diver's case, by staying within the no-decompression limits.
If the pressure gradient gets too high or if something else goes awry with the diver's decompression, it's like suddenly popping the cap on @OTF 's soda bottle - the pressure inside the bottle goes from high to low very quickly, and the CO2 that was dissolved in the soda forms bubbles. So it is with divers - bubbles of nitrogen can form in the blood and body tissues. Those bubbles can cause symptoms by directly blocking the circulation and by activating the inflammatory pathways in the body. This is decompression sickness.
Best regards,
DDM