Which part of a modern firearm has the same function as the lock on a muzzleloader?

Which part of a modern firearm has the same function as the lock on a muzzleloader?