Sometimes it can be free, such as in a hotel that has wifi for guests. Sometimes it is a charged service, methods of which probably vary. Exact details of payment methods, I'm not sure about. I know the charged services must use an access key, for obvious reasons.
Sorry that my answer is a bit vague, pj, but at least it bumps you up from page 2!