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 suffers from the free-rider problem, if a person does not pay for national defence, 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.