Most nationalities can obtain visas at any border, port or airport EXCEPT the King Hussein (Allenby) Bridge, which requires a pre-issued visa. Some nationalities require visas in advance. Transit visas can only be issued at Jordanian airports/airlines and not at embassies or consulates.
A tourist visa will cost you 40 JD. It generally expires after a month and is easily renewed for three months. Otherwise, a penalty of 1.50 JD per day is applicable.