In the real world, if one stands in front of a locked door and says Alohomora, it is highly unlikely that the lock will open. However, in the Harry Potter universe, Alohomora is a real spell used to open locked doors very easily. It is used by several characters in different instances to open locked doors.