If something can have an inventory item used on it, the cursor changes to what looks like a wrench. (Or spanner if you're on the right side of the Atlantic.)
If you have the proper key for the door, all you have to do is click on the key in inventory and you will get an animation of the key working on the door. If it's the wrong key for the door, you'll get no response. Be advised there are a number of keys in the game.