Unfortunately there is no unified toll collection system in the US so the answer is "depends". In some places you can pay directly cash at a toll booth per section as you go along. In other places, you need to pull a ticket when you enter and pay when you leave (cash, sometimes credit). These days most collection system also use and electronic transponder and/or plate readers. Transponders require you to have an account. With a plate reader, you can get either sent a bill or can pay the toll on-line. Not all places have a cash option, so you may be forced to use a plate reader.
There can be substantial price differences: transponders tend to be the cheapest. Things can be further complicated if you use a rental car. If you use a plate reader that sends a bill, the rental company may charge you an hefty administrative fee to process the payment for you. They may also offer you a local transponder, but that typically also costs extra. A ride from metro west Boston to the airport runs you about $5 with a registered transponder but could easily be up to $20 or more for a rental car and using the plate reader.