How does public-available charging of electric vehicles work?

I don’t have an EV, but I can answer this one because I looked it up a while ago.

There are two types of billing, energy based (by the kilowatt-hour) and time based. I believe most are energy based.

Tesla chargers are energy based, but they will start charging you for time connected once your vehicle is fully charged. This is to discourage you from just leaving your car on the charger any longer than necessary so that someone else who needs to charge their vehicle can use it instead.