Cinemagraphs are videos where most of the motion is frozen and only selected elements are moving, e.g. the sky, water, hair, etc. They can be used in Facebook video ads either as a video or a gif file.
Cinemagraphs can be produced in two different ways. Professionally they're produced from videos shot with a tripod and then most of the motion is removed until only a selected element moves. Alternatively, an image sequence is used and the motion is interpolated from the difference between the images. A relatively easy to use tool for this is Flixel, which is available both on iOS and macOS. They offer free trials, the subscription for both versions costs 199 USD / year.
Here's an example of a still image, where the sky was animated using the iOS app:
Original
GIF
Video
You can find more examples by Googling "Cinemagraphs".