Second type is torque sensing. This is quite a bit more expensive (an additional couple hundred, plus higher installation skills if you are converting yourself).
Another note is that most assists don't sense hills, so you will have to manually adjust the assist level when going up hill. So at that point, using a throttle-only setup, with a throttle lock (hold throttle in a position for 2 seconds and it keeps it at that setting) works really well. In that case it gives you the sensation of having a good wind at your back helping you out.
The primary cost can be the battery -- anywhere from 200 to 1000, depending on capacity and quality. Second is the motor, 200 - 500. Some come with kits that give you simple throttle control, or you may want to add an advanced ebike computer kit (like I mentioned in the previous comment).
All told, I'm about 1200 in my ebike, plus the bike itself.
I can’t wait for pedal assist ebikes to become more affordable. It opens up biking as an option for a lot more journeys, not just for lower-fitness people, but in regions where it’s hilly.
For where I live in Los Angeles, the places I bike to are a couple of miles away (or close enough that walking makes more sense), but uphill all the way. Having pedal assist would mean that I don’t arrive sweaty with tired legs. I don’t need to go 25mph, just 10mph with less effort.