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.
A completely different and much simpler approach is used by the app Plotagraph. There you use a still photo, define which elements of the image should be animated and the app creates a movement for you. The iOS app is available for 5 USD, desktop apps for macOS, Windows and Linux offer limited trials or start at 5 USD / day.
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".