How to lock the keyboard ?

How can we lock the keyboard of a computer when we want to keep it running a program?
It means that when we work in a group and everybody can use any computer the computer and we want to go until the end of program run iterations.
