Primarily, interlockings prevent the setup of conflicting routes at places such as junctions or crossings. An interlocking is designed so that it is impossible to clear a signal for a train to progress unless the route ahead is proved to be safe.
An interlocking is a safety-critical signalling device. Modern interlockings have many additional functions incorporated such as Automatic Route Setting and Automated Signalling which depend on the safety-critical data contained in interlockings.