The mucous membrane in your nasal passages have a specific pH (acid vs. base) level. When you get water up your nose, the water is slightly acidic or alkaline (depending on where you live) and that can irritate the mucous membrane due to the interaction between the mucous and the water. If you wait a few minutes, it should go back to normal.
Chat with our AI personalities
There is a pressure difference between the inside of the ear and the water outside. Because the air inside is compressible, the water will begin pushing in; this stretches the tympanum (eardrum) and causes irritation.
The water molecules separate using the force of the mass but cohesion is acting against your body force to stick together, which is why it hurts.