Protein skimmers are fr saltwater and brackish tanks only, they dont work in freshwater.
Anyway what it does is remove excess organic compounds from the water by causing them to stick to tiny bubbles created inside the skimmer, they are then carried to the surface and dumped into the collection cup as a foam (known as skimmate), this way waste is removed from the aquarium before it gets the chance to break down into ammonia compounds.