You can buy adwords to sell yourself or product. That is where they come from. You buy them from Google. The cost varies and many are by auction. You bid to pay so much to appear and Google will place them depending upon the contract.
If you are talking about adwords that appear on your webpage, someone else has paid to put them there. The website receives a very small fee each time one appears and another fee if someone clicks on the adword. It's very little money but can ad up with a lot of page views and people clicking on them.
For someone to be paid for adwords that appear on their site they have to sign up for Ad Sense which is an affiliate program by Google. I'm an Ad Sense affiliate (YouTube asked me to join) so when an adword appears on any one of my many websites I get about 1/10th of a cent but make about a penny if someone clicks on an ad. Sounds like not much but these things can ad up with enough visitors.