Well first you create an Enumeration in the editor. The Enumeration contains all states that make sense in your game like MainMenu, InGame etc.
Then put a variable of the type of this Enum somewhere it makes sense, I recommend the GameMode if building a Singleplayer game (keep in mind that there already exists a state with PostLogin, Playing etc., maybe you could use that).
When you start you set that state to MainMenu, when the player starts a game you set it to InGame etc.
Now when it is time to show the pause menu you simply check for the current state and show the Pause Menu depending on that.