On a write, the flow is fixed: application sends the new value to the caching layer, the caching layer writes it to the database, waits for the database to confirm, updates its own entry, and only then returns success to the application. The two writes happen synchronously, so the slower of the two sets the total latency.
On a read, the application asks the cache first. If the key is present it returns immediately. If it is not present (a cache miss, common for data that was written before the cache existed or that aged out), the system falls back to the database, loads the value into the cache, and returns it. Each cache entry usually carries a TTL so stale or unused keys expire on their own.
A subtle detail: write-through writes everything, including data that may never be read again. If you write a million log rows you will never query, you have paid to cache all of them. That is why some teams add a TTL or only cache-on-write for hot key prefixes.