Bikes come with several different braking systems for different uses. These can be coaster brakes, hand brakes, disc brakes, or even drum brakes.
Single-speed bikes use a coaster brake (pedal brake). It is usually possible to add hand brakes to coaster brake bikes.
3-speed bikes usually come with a coaster brake. They may also have a hand brake. Some 3-speeds may even have a freewheel in which there are both front and rear handbrakes instead of coaster brakes.
Other multi-speed bikes like 7-speed and 21-speed use hand brakes. These bikes cannot use coaster brakes.
To safely stop on a single-speed coaster brake (pedal brake) bike, you need to be aware of your surroundings and need to be aware of whats coming up. This is because it can take a little longer to stop with a pedal brake.
When you use your brake levers to stop you don't want to use all four fingers. You want to use one or maybe two fingers to pull the brake lever. When you use all four of your fingers to hit the brakes, you are in less control of your bike because only your thumb is holding on to the handlebars. You will be in full control while braking if you use 1 finger.
Here's a great video about using hand brakes: