Locks and critical sections
A lock is an object that only one thread can hold at a time, and a critical section is the code that runs while a thread holds it. Adding a lock is the easy part. The interviewer asks which lock, on what object, and covering how much.
The token on a single-track railway
Some country railways have a stretch of single track between two stations, where a train coming the other way would meet you head on. The stretch has one metal token, and a driver may enter it only while holding that token. A driver who arrives while the token is out waits at the station, and hands it in at the far end. The stationmaster keeps the token in the office, so no passer-by can walk off with it. Trains in both directions use the same one.
In code, the stretch of track is the critical section, the code where shared data may be half-changed. The token is the lock, and each driver is a thread. Waiting at the station is a thread blocked until the lock comes free. Trains in both directions sharing one token are every read and write of that data using the same lock. The office is a lock object that outside code can't reach, and a slow goods train is a thread making a slow call while it holds the lock.