It is easy to think about public goods as free. In your everyday life, you benefit from public goods such as roads and bridges even though no transaction occurs when you use them. However, even public goods need to be paid for. In the case of roads and bridges, everyone pays taxes to the government, who then uses the taxes to pay for public goods .
Roads
Free riders are able to use roads without paying their taxes because roads are a non-excludable public good.
Public goods, as you may recall, are both non-rivalrous and non-excludable. It is the second trait- the non-excludability- that leads to what is called the free-rider problem. The free-rider problem is that some people may benefit from a public good without paying their share of the cost.
Since public goods are non-excludable, free-riders not only can't be prevented from using the good, but actually have an incentive to continue to free-ride. If they will be able to use the public good whether they pay their share of the costs, they might as well not pay.
Take the military, for example. National security is a public good: it is both non-rivalrous and non-excludable. In order to have such a public good, everyone pays taxes which are then used by the government to finance the military. However, there are undoubtedly people who have not paid their taxes. These people, without having paid their share of the cost of having a military, still benefit from the protection the military provides. They are free-riders.
Of course, there are commonly regulations that attempt to discourage free-riding. For government-provided public goods, the government makes sure that everyone pays their share of the costs by enforcing tax laws. The threat of fines or jail time are enough of a threat that most people find it more appealing (in the US, at least) to pay their share of public goods via taxes than to free-ride.