How to create a pause function in my snake game.

Ive created a snake game with the help of a tutorial and i want to create a pause function for my program however, every other tutorial and website i looked at hasn't really helped, can someone help me figure out how to pause my game?