History
The Lock is a demonic entity and the second half of The Key, a mystical infection that finds out what its victim has the most emotional attachment to so that The Lock can track it down and destroy it. The purpose of this is to goad The Key's victim into murdering The Lock; as an infected becomes plagued with visions of dormant giant demons, killing The Lock enables them to fully manifest and wreck havoc. When Iron Man became infected by The Key, it sent out The Lock to murder extraterrestial immigrants that Stark had personally helped relocate to Earth.
Iron Man became aware of the string of murders after The Lock killed its fifth victim in Lagos, Nigeria. When he investigated the crime scene, The Lock snuck into his ship, which Iron Man then used to visit another immigrant in Atlantis. The Lock got ahead of Stark while he and Maria Hill were held up at the immigration office, and killed its target. It snuck back into the ship, which Iron Man took to the Blue Area of the Moon to check on the last immigrants. Having deduced The Lock's modus operandi, Iron Man detonated his ship as soon as he disembarked with Hill. The Lock emerged from the wreckage, and was quickly shot down by the duo as intended. This opened the door to the invading demons, but they were subsequently stopped by Iron Man with Doctor Strange's help using the D.O.M.E.[1]