Apps can be written to download and cache ads periodically as part of their "update" process, and display these ads even when you don't have an internet connection. If they are not able to update these ads for some time (say 60 days), they can then refuse to run: "the application has expired and needs an update; please connect to the Internet". New ads are fetched when the user connects and lets the app update.