Lockstep is a noun. It can be a way of acting in complete uniformity with someone or something else. A boy who follows his older brother around and imitates everything the brother does could be describe as being in lockstep with his brother. It can also be an specific inflexible process. Such as the rules for arming a nuclear weapon. I don’t know the rules but I suspect they must be followed to the letter.
Although I couldn’t find an etymology of lockstep I will hazard a guess. I think it comes from military training were solider must march so close together their steps and legs appear locked together.
An idiom with a presumably similar etymology but opposite meaning is “to march to a different drum.” For more information on this idiom and many others check out Robert Diem’s The Daily Idiom podcast.