Those are usually in-app ads from mobile ad networks. Developers add an SDK from networks like AdMob and then show formats like banners, interstitials, or rewarded ads inside their apps.
If you want to use them, you normally sign up for an ad network and integrate their SDK, or use a mediation...