Lockpicking experience is granted for two things: succesfully opening locks, whereby experience is levelled according to the difficulty of the lock, or by breaking lockpicks, which gives a smaller, flat amount of experience regardless of the lock difficulty.
Lockpicking and Pickpocket are two skills which often go hand-in-hand - probably because, to gain access to locked doors, there's normally a choice available to the player: lockpick the lock, or pickpocket the key. Watch on YouTube The fastest way to max level Lockpicking and Pickpocketing