TTL is a cache lifetime
A DNS record can include a Time To Live value telling resolvers how long they may keep an answer in cache. Until that period expires, a resolver can continue returning the previous value.
That is why a DNS change does not always become visible everywhere at exactly the same moment. Lowering TTL before a planned change can help, although other caching along the path may still influence what individual users see.