Complete the first year of Hogwarts lessons, specifically the Flying Lesson mission. After finishing it, Alohomora becomes available to unlock doors and chests throughout the game.