This article explains how to record what's happening on the screen while playing a game on a PC running Windows or use the built-in recording feature of Windows 10.
Steps
Method 1 of 2: Using Fraps (Windows 10, 8, and 7)

Step 1. Go to https://www.fraps.com/download.php in a browser
This will open a page to download Fraps, a free video capture and recording software for Windows.

Step 2. Click on the Download Fraps link
The link also shows the current version number, which is variable. The installer will be downloaded to your PC.

Step 3. Double click on the installer, which is the file you just downloaded

Step 4. Follow the on-screen instructions to install Fraps

Step 5. Open Fraps
It is located in the "All Programs" area of the Start menu.

Step 6. Click on Movies
It is located in the central part at the top of the window.

Step 7. Create a keyboard shortcut to capture video
The keyboard shortcut, or hotkey, is the key you will press on the keyboard to start and stop recording. By default, the keyboard shortcut is F9, but you can change it if you want.

Step 8. Change your video preferences
- Click on "Change" to save the video in a different place.
- If you wish, in the "Sound Capture Settings" section, check the box next to "Record Win10 sound" to record the sounds. If you plan to use a microphone, check the "Record external input" box, then select a microphone from the menu.
- For best results, select "60 fps" in the "Video Capture Settings" section.

Step 9. Open the game you want to record

Step 10. Press the shortcut (for example, F9) to start recording
Everything that appears on the screen until you press the hotkey again will be registered.

Step 11. Press the keyboard shortcut again to stop recording
The video will be saved.
To quickly find the video, click on "View" in the "Movies" tab, then double-click on the file
Method 2 of 2: Using the Game Bar (Windows 10)

Step 1. Launch the game you want to record

Step 2. Press ⊞ Win + G
The game bar will open at the bottom of the screen.
You may need to select "Yes, this is a game" before continuing

Step 3. Click on the register button
The icon looks like a red circle and is located on the game bar. Everything that appears on the screen will be recorded. At the top of the screen you will also see a timer.

Step 4. Stop recording at the appropriate time
To do this, click on the white square located in the game bar. The finished recording will be saved in a folder called "Clip", which is also located in the "Games" folder.