Well, if the lockpick fails, you may not have enough pionts in that skill.
How to use it - select the skill on your skills, like you would a spell. Then right click by the door/chest, and it should work. But, if not, then you do need a higher level...