They are two types of baby bed rails. The first is more like a bumper, in other words, it is something to keep a very small baby or infant from rolling out of bed. A more common use of the term "bed rails" is to refer to a device that is mounted on the side of the mattress to prevent a pre-toddler from rolling out of bed.
Generally speaking, when a child is old enough to try to crawl out of the crib, or is old enough to crawl in and out of bed, the child is ready to move from the crib into a regular bed. However, most parents fear, rightly so, that the pre-toddler in a big bed may fall out in the middle of the night. Therefore, parents install baby bed rails on the side of the bed.
Baby Bed Rails
That rails are generally made in a way that attach to the mattress, and stick up about a foot or so above the bed and are about as long as a large toddler. These bed rails then keep a toddler who tosses and turns in their sleep from rolling off the edge of the bed. Nicer models also include the feature of being able to drop down out of the way. Many people need to be able to change a child's diaper and having the child lay in bed while they do that is the easiest way. The problem is if the bed rail cannot move out of the way, the parent has to bend and reach over the bed rail to change a diaper, which is very uncomfortable. Having the ability to drop the bed rail out of the way is really convenient.
Modern versions of that rails are very different than they used to be years ago. No longer are they actual metal rails through which a child could get stuck. Today they are mostly plastic frames with metal reinforcement and a large mesh screen, and covered with pads. This prevents the child from getting injured by the rail.
Bed rails for toddlers come in a variety of colors, including pink for girls. You can also find models that have rails on both sides of the bed. This is good for beds that are laid out in the middle of the room, instead of up against the wall, which is what the single rails are for.