How exactly do wind and solar power companies make their money?

I only invest in small-cap energy based companies like oil, gas, petroleum, and more recently, wind and solar power.

What I would like to know is how exactly do wind and solar power companies make their money? Please, I’d like to understand the industry a bit better. Thanks!