I have not tried it myself, but some people mentioned in another thread that you must first buy a book about lockpicking from a merchant at the market place and read it. Only then you will have the lockpicking ability.