Local buses in 23 special wards of Tokyo and other metropolitan areas have fix fare but suburban areas usually do not have fix fare, which means you have to pay per distance. Therefore you have to board the bus from the rear door and pay when you get off. Also you have to touch your contact-less smart card(Suica, Pasmo and etc.) when boarding if you pay by the card. If you pay by cash, you need to take the ticket upon boarding and put it together with the exact amount into the box when getting off.
There are several sizes of the buses. Recently there are more mini-bus running in suburban areas than before. These buses usually do not run between stations as like other bigger buses but engaged in running along residential areas where streets are narrow.