The Unlocking Charm (Alohomora) is indeed used to open locked doors and is one of the first spells learned by Hogwarts students. It is a basic utility charm taught early in the curriculum, as seen in the first book when Hermione uses it to access the forbidden corridor on the third floor.