Hair absorbs moisture from the air and expands (and swells). The exact structure of your hair will determine what it actually does when it gets humid, but it's basically a buckling from absorbing the moisture.
usually curly hair is really dry so when it needs moisture then it expands in order to get the moisture from the air. that’s probably why it isn’t frizzy when it’s completely drenched because it’s just been submersed in water.