Free screen capture utilities come bundled with Windows and Mac operating systems. In Windows, you can use Snipping Tool to capture your screen. In Mac OS X, either press Command+Shift+3 to capture the whole screen or Command+Shift+4 to capture a part of it.
If you want to capture your screen as a video, you can use Open Broadcaster Software to do so for free. It is available for Windows, Mac OS X and Linux. While the original release is only available for Windows, OBS Multiplatform also works on Mac OS X and Linux. Videos are encoded using H264 and AAC and saved as .mp4 or .flv files.