(Click on any item for details)
Locks a door or chest in the same way that the Open spell opens them. This effect exists in the editor, and there are even two (inaccessible) spells (Easy Lock and Average Lock) that use it, but with several warnings, saying "DO NOT USE". If you were to acquire one of these spells, it would be possible to create custom spells at the Spell Making altar (enchantments would also be possible).
After some testing, it seems to work most of the time. Both interior doors and exterior doors were tested. Some doors do not seem to be lockable, and you cannot cast it on something that is already locked. If you lock an interior door that is already opened, it will say it's locked, but can still be closed normally, after which it will no longer be locked. Casting it does not seem to be a crime, though if you cast it on a door which is "owned" by somebody, then picking the lock will be a crime. Casting on containers seems to work every time, even on containers that aren't generally found locked in the game, such as sacks or lecterns.
It's likely that one reason this spell was removed from the game was that it would confuse the AI of the characters if a door they were expecting to be able to go through was now locked. For example, if you manage to lock a pursuer in a room, anyone who comes to your aid will run towards the door and flicker back and forth. Also, if you run into another cell, they will still follow you even though they are locked in. Another is that it could be possible for you to lock yourself, with no lockpicks or Open spells, in an area prohibiting fast travel, thus trapping yourself forever.
If you give yourself access to this spell, it's a great way to practice your Security skill. Just keep locking something and picking it over and over. It's also a good way to flee from a pursuing enemy, though since not all doors are lockable, it could be unpredictable. NPCs are completely incapable of opening locks of any difficulty unless they have been specifically scripted to open the door/chest (whether they have the key in their inventory is completely irrelevant). NPCs cannot use lockpicks or Open spells. However, it is important to notice that guards can pass through (when committing a crime) a door you have just locked.
In order to try out this effect, you can give yourself one of the spells via console with the following commands:
player.addSpell 000A9805 or
player.addSpell 000A982D, for the Easy and Average Lock spells respectively (Journeyman Alteration skill required for the Easy one, Expert for the Average one).