What happens if you don't pay a fine?

It depends what the fine is for and who is demanding payment.

Public parking fines, speeding fines or fines given by police/authorities will have to be paid by law within a certain time. If you don't pay on time, then an arrest warrant will be released against you. Meaning you are now a wanted person. You'll get arrested and held by the police until you appear in court. The judge will, depending on the severity of the fine or the circumstances of it, either sentence you to a few weeks in jail or a few weeks of unpaid service work. Both will look terrible on your record, making finding employment, getting loans and so on very difficult for you.

If the fine was issued by a government organisation, such as a benefits office (unemployment, disability, etc), again it is the law that you must pay. If you don't then it'll be treated the same as above.

If it's a parking fine for a private car park (not a public street, etc) then you are not legally required to pay it by law. However if you don't pay it, you can still be summoned to court by the owners of the car park. Failing to attend court when summoned is a criminal offence, so if you do not turn up, there will be a warrant put out for your arrest.

The judge in court will tell you when you should pay the fine, otherwise you'll do some unpaid work. If you feel the fine was unfair, the judge will determine that too. If you failed to turn up to court when summoned, you can be jailed for a few weeks for failure to respond to a legal summoning.

Library fines, school fines and so on are minor and there is no law saying you have to pay those either. But, again, the owners can summon you to court for failing to pay.

Remember - you also have the right to appeal. Appealing against a fine will make the process longer, so the deadline will usually be extended because they are required to read and consider your appeal and reply to you. You only have one appeal, so make it good.