In the United States, this is by far the commonest kind of lock. I'm sure there's a name for them in hardware stores, but in everyday life we wouldn't use any special name. If we had to say something about it, we would say something like "the door is set to lock itself when you leave." Or, conversely, "don't trust the regular lock, always use the deadbolt."
Note about "deadbolts."
In the United States, most good locks, for a house or hotel door, contain two different lock mechanisms. One has the bolt with the slanted bevel. When the door is open, the bolt protrudes, held open by a spring. You can just close the door. The action pushes the bolt in against the spring. When it is closed all the way, the bolt pops out again and the door locks itself. Unfortunately, it is pretty easy for a burglar to open this kind of lock, using something thin like a credit card. They force the card in against the bevel and it pushes the bolt back.
There is a second bolt, called the "deadbolt." It has no bevel and no spring. You can retract it or extend it with a second mechanism. If the door is open and you extend the bolt, you can't close it. The deadbolt is more secure, because it doesn't have the bevel, and because it extends out further into the doorjamb.