The Unlocking Spell is a spell that unlocks locked doors or other objects. Its incantation is Alohomora (/əˌloʊhəˈmɔərə/ ə-loh-hə-mohr-ə). It first appeared in Harry Potter and the Philosopher's Stone.
This spell is presumably taught in first-year Charms classes, as it is included in The Standard Book of Spells, Grade 1, the book assigned for the Charms course on the students' first year at Hogwarts.
The Unlocking Spell can open and unlock doors, chests, or other objects with locks on them. These objects, however, can be bewitched so that this spell has no effect; for example, the doors to Professor Snape's and Professor Umbridge's offices are mentioned as being impervious to this spell.
Used throughout the series, with the first use by Hermione in Harry Potter and the Philosopher's Stone. Used gradually less in the series as the characters discover more and more doors, chests, etc. with counter-charms on them.
This spell is found in The Standard Book of Spells, Grade 1. It can't be used in a wizard's duel, though it can be cast in the third moment of chapter 9 in Philosopher's Stone ("The Midnight Duel").
J. K. Rowling stated that the word Alohomora is from the West African Sidiki dialect used in geomancy and has the literal meaning "friendly to thieves".