Optical flow algorithms are used in videos to track features across successive frames. Let's say you want to track a particular object in a video. Running a feature extractor on each frame would be computationally expensive; hence, the process would be slow. So, you just extract the features from the current frame, and then track those features in successive frames.
Optical flow algorithms are heavily used in video-based applications in computer vision. The optflow module contains all the algorithms required to perform optical flow. There is also a module called tracking that contains more algorithms that can be used to track features.