Well first of all before we start you will have to download a game/screen recorder.
There are many software that allows you to record your game (Bandicam, OBS, Action, Playstv, Shadowplay if you have Nvidia GPU and more)
Personally, I would recommend you Shadowplay or Playstv if you don't have Nvidia graphics card, also this 2 software allows you to save the last X minutes of footage whenever you want.
Setup & Recording
Shadowplay (only if you have Nvidia GPU!!)
Spoiler
Spoiler
Editing
Playstv does not only allows you to record your game it also has basic video editor which allows you to crop your videos and do basic stuff, however, shadowplay does not have this feature so you will have to use a video editor to edit your videos, the most common software to edit and render your videos is windows video maker which comes with your windows.
I would recommend you use Windows maker if you are looking to do basic stuff such as crop and render your videos
How to use Windows Video Maker
Spoiler
How to use HitFilm 4 Express
Spoiler
Note: all the software I mentioned above are totally free so don't go in the comments and whine why I don't see sony vegas or adobe premiere here.