The only way to be sure is to memorize. However, you can use guidelines to make the right choice 90% of the time or more.
If there is no compartment involved, you get ON it. (bicycle, motorcycle, skateboard, etc.) (Note: partial compartments, such as those of convertible cars or open-topped boats, count as compartments; pretty much anything where the vehicle at least partially surrounds you.)
Oddly enough, if the transportation is large enough to allow you to move around freely, you also get ON it. (Bus, train, large boat, passenger plane, etc; anything with an aisle or walkway.)
Otherwise, you almost certainly get IN it. (Car, personal aircraft, canoe, etc.)
Thus, you would get IN a speedboat, but get ON a cruise ship, even though both are boats and both are enclosed, because the speedboat is small enough that although you can probably change seats without difficulty, you can't really move around freely inside it.
As a counterexample, even though a van may be large enough that it does have an aisle and you can move around freely inside it, if you call it a van, you get IN it.