This is probably a question best asked in the Marines forum, because they are used mostly in marine tanks.
But, if you've ever walked along the beach or a river, you will have seen "froth" where the water splashes. For some reason, many organic materials (not necessarily proteins) stick to air bubbles in preference to staying dissolved in the water. So when air and water mix, the organics turn into a foam, and the foam collects on the surface.
Using the same approach, a protein skimmer introduces a fine mist of air bubbles and so collects organic waste. The bubbles collect in a cup, and (usually daily) you empty the cup. Because the organics haven't had time to decay, they don't add to the nitrate and phosphate levels in the aquarium.
One limiting factor is the size of the bubbles: they need to be very small to work properly. For some reason, in freshwater the bubbles don't seem to be the right size, and protein skimmers don't work properly/at all. In brackish water they can work very well, but the specific gravity needs to be fairly high, around SG 1.010.
Cheers, Neale