The plug lock can also be used without any cable attached, to lock the socket from use. 
Plug lock comes with a cable blanking plate that covers the cable inlet, to be used as a socket lock.
You can also use plug lock when attached to an appliance, to stop it from being plugged into a socket.
All you do is lock the plug while it's out of the socket, this prevents any unauthorised access or faulty equipment being switched on.

How this works:
The 3 pin plug lock can be mechanically locked into its socket via the plugs earth pin so that it cannot be easily removed from the socket. 
This is achieved by rotating the disc on the plug top when the disc is rotated a plastic rod inside the earth pin of the plug is moved downwards which spreads apart two rubber earth locking pins, thus locking the plug into the socket via friction. If one of the rubber locking pins is obstructed, then the other rubber pin will lock the plug into the socket. There is an indication on the top of the plug that informs you that the plug lock is in the locked position, see pictures below.

The reason we use rubber pins is so that the socket does not get broken when you try and pull out a plug that's been locked into the socket. 
At all times the socket has to maintain its integrity.