The way they work is pretty simple: The motor kicks in with extra assist when you pedal, and there are different levels of assistance. That's it. Just turn it on, pedal, and go! You can also turn the assist mode off and ride it like a regular bike. And e-bikes stop assisting at a certain speed (in the U.S., it's 20 mph or 28 mph depending on class) for safety, of course.
After you decide which style of e-bike you want, consider the class. In the US, there are three classes defined by the type of assist and how fast the motor will propel you. Most electric bikes sold are class 1 or 3. Class 1 bikes have a motor (max 750w) that assists while you're pedaling, up to 20 mph. Class 3, also known as “speed pedelec” can also have up to a 750w motor, but it can assist you up to 28mph. Both of those are allowed in most states and cities without license. Class 2 have throttles that don't require you to pedal to get a boost. They're allowed on most streets, bike lanes, and paths, but less popular than the other classes and not covered much here (because we still love to pedal and the greater distances pedal assist bikes can cover).