Goods like flood defenses, road signs, streetlights, roads, beaches, traffic lights, lighthouses, and military defense are provided by the government and not through the market mechanism
The issue with public goods is the free-rider problem, where individuals have the incentive not to contribute anything at all to the provision of the public good because they can free-ride off others' contributions
A public good that sometimes shows the pure characteristics of a public good (non-excludable and non-rival), but sometimes shows the characteristics of a private good (excludable or rival)