There are four types of keys:
Each key will open a door if the door matches the key, though some doors will require 2 types of keys, however as this can be difficult to tell, a hit and miss strategy of cycling through your keys is recommended. A key will be destroyed upon use.
The doors are usually protecting Arcana Ore, and can be one or two blocks wide. Once a door has been unlocked (and the key destroyed) it is not actually 'unlocked' but it's state (open or closed) has been changed. This means that it is possible to waste multiple keys on a single door, which is not recommended.