'Electric bikes' covers a huge group of different bikes. These days there are electric versions of pretty much any category of non-electric bike: cargo bike, mountain bike, road bike, city bike, scooter, etc.
If we step back and look at all bikes that have some component of electric-powered drive, we can split the entirety into pedal-assist, and throttled. Pedal-assist amplify your own efforts, and won't give you anything unless you are pedaling. In most jurisdictions, these are considered bicycles and allowed to behave as such. Throttled e-bikes don't require pedaling to go, but also often have pedals. They blur the line between bicycles and low-powered electric motorcycles, sort-of like modern mopeds. Governmental jurisdictions and insurance are still trying to figure out what to do with these, so your local situation may vary.
When it comes to the mechanics of them, there is a lot variety and some innovation (as with anything fairly new and rapidly growing) but we can start to understand them by splitting them into hub-drive and mid-drive. Hub drive have the motor inside the wheel hub. Mid-drive have the motor next to and geared to/belted to/chained to the pedal cranks.
If we take a 10,000 foot view, hub drive are often cheaper, can be a retrofit for an existing non-electric bike more easily, allow regenerative braking, and have good instant torque...but suffer in terms of efficiency, weight distribution, and increased stress on the wheels and fork/frame. Mid-drives offer great efficiency, smooth and quiet operation, balanced weight distribution, and better integration into a specific e-bike design, but are tougher to retrofit, and don't offer regen.
There are a few big players in the market for power units, as well as some small ones. Lots of bike manufacturers buy or partner with electric power suppliers and battery suppliers. Not many bike companies develop their own. This means that you can find Bosch or Shimano or Bafang powered bikes sold under many brand names, and vice versa.
Speed depends upon what regulations they are built to. Class 1 and Class 2 are limited to 20mph. Class 3 are limited to 28mph. The limits are just for the electric drive; the rider can go faster than the limit via human power if strong enough. Many bikes can be 'hacked' to exceed the manufacturers operating parameters. As with all forms of hotrodding, reliability will likely decrease, and risk of mechanical failure and injury is all on you.
Prices range from a few hundred dollars to fifteen grand or so. For an automootive analogy, do you want an unknown-brand, semi-kit-car, local-trip econobox, or the latest and greatest drive-all-day sports car or GT from a name brand with lots of cachet?
They are tons of fun...just like a bicycle, but you can go further, or you can cover more ground in the same time. Don't forget that it is advisable to step up your protective gear with the increased speed. Helmets, gloves, and lighting to make you visible is a good start. Motor vehicles may not accurately judge your approach speed.
Oh yeah, cheap ones may burn down your house/garage while charging!
Im sure others will add more.