There are many different types of stock sites and they all work a little differently. Some of the better, older stock sites look out for the photographers rights and pay reasonable rates. You submit your images to them for approval, if your approved they list your images available for licensing. If somebody wants one they pay the site and the site sends you your cut. The newer micro stock sites are a little sketchy. They pay pennies per image and you may or may not be giving away all your rights. Read the fine print very carefully.
"Nobody belongs to us,
except in memory"