A public good is a good that a person can use the without reducing the quantity available to others and others cannot be exclude from using the good. This means that a public good is non-rivalrous and non-excludable. National defense and clean air are two such examples of public goods A public good that remains non-excludable and non-rivalrous is known as a pure public good.
An impure public good is a public good that is not entirely non-rivalrous or non-excludable. While clean air is a public good in that anyone can use it and there is essentially an unlimited amount of it, if too many people use the clean air and it becomes polluted than the amount of clean air has been reduced and others can use less of it. In the case where an impure good becomes more rivalrous it is more akin to a common resource. 
When a person enjoys the benefits of a public good without contributing to the cost of it, they are known as a free-rider. National Defense also suffers from the free-rider problem, if a person does not pay for national defense, they cannot be exempt from its benefits (i.e. being protected from an attack).
To combat the free-rider problem, user fees can be charger to ensure that all who benefit from the use of the public good contribute to its cost. Lighthouses are an example of a public good which everyone (any ship using its light) benefits from but not every ship pays for the service it provides. If ships were charged a fee every time they used the light house (a fee at the port they enter) then the free-ride would not exist.
Some sources of renewable energy are public goods. Solar power, wind power, tidal power and geothermal energy are all examples of public goods. For example, nobody can be prevented from using the sun for solar energy and there is an unlimited amount of sunlight to be used. In contrast, oil or coal are both rivalrous and excludable, making them private goods, A country can prevent people or firms from using the coal or oil (without paying) and there is a finite amount of coal or oil available in a given area, that is once a well or mine is exhausted, it does not replenish.