It basically converts videos between formats, standards of compression, encoders, subtitles, dimensions.... It's pretty useful for trimming the size of a video to fit a particular medium.
HandBrake's backend contains comparatively little original code; the program is an integration of many third-party audio and video libraries, both codecs (such as FFmpeg, x264, and x265) and other components such as video deinterlacers (referred to as "filters"). These are collected in such a manner to make their use more effective and accessible (e.g., so that a user does not have to transcode a video's audio and visual components in separate steps, or with inaccessible command-line utilities).