Songtows (สองแถว) are like buses is most Thai cities. They have a specific route and you can get on or off one anywhere along the route. They are usually cheaper than taxis or tuk-tuks. In some cities they are more like shared taxis and will take you just about wherever you need to go.
If there is not set route, tell the driver where you want to go. He will stop at your destination. You should hop out and then pay. You might want to ask how much the fare is before you get in, just in case.
If there is a planned route, then you get in and press to buzzer. It’s usually on the ceiling. When you get off you pay the driver. There is usually a flat rate no matter how long you ride.
Songtow drivers are less likely to try to scam you than the notorious tuk-tuk driver, but always use common sense first. Find out the price before you get on. If it sounds too high, don’t get on.