From Diablo Wiki
Assassin picks locks
The items on this page are not life or death, generally speaking, but are conveniences you want and need. Keys are dropped by monsters or purchased for a very low price in town. They stack 12 high, and are readily available. Each time you open a locked chest, one of your keys is used, and destroyed. There are no locked doors, and never anything in a locked chest you have to have to advance in the game. They are purely a bonus item, but as locked chests are common, you should be sure to always carry some of these.
There are only two types of them in Diablo II; Town Portal and Identify, and scrolls can be equipped in the belt or stored in inventory. To cast one you either right click on it, hit the appropriate number of the belt slot, or select the skill icon and right click on it.