unlock [DOOR] with [KEY]
pick [LOCK] on [OBJECT]
In your travels, you'll come across some doors, gates, chests, etc., that are protected with locks. Usually that means there is a key to be found in the vicinity. It is important to remember that some doors and keys have identifiers which you'll need to use. For example, <pick metal door with skeleton key>.
The dungeoneering skill can allow you to pick the locks if you have a proper set of thieve's tools, which can be found at the fences, and in a limited number of shops and mob drops.