Simon says arduino game

I've tried to alter the code but it doesnt work.

That statement is wrong. The code does work. It might not meet your expectations, but that only means that your expectations are wrong.

If you need help aligning your expectations with reality, you'll need to describe exactly what the program does, and how that differs from what you expect.

Does anyone know how to change the servo into a lock that should stay HIGH for 10 seconds if someone wins the game?

That should be trivial. There is a play_winner() function that moves the servo. Just replace that code with code to make a pin HIGH, or LOW, as required to make the lock operate. Wait 10 seconds, instead of 1/2 a second, then set the pin back the other way to re-lock.