Sometimes, there is a failed attempt to write or read a part of the data in the cache. This miss results in longer latency in the main memory. There are three types of cache miss i.e. cold or compulsory, capacity and conflict miss.
Cold or compulsory miss starts with an empty cache and is the foremost reference to a memory block. You can refer to it as an empty hotel where the first guest hasn’t arrived yet. A capacity miss occurs when the cache doesn’t have enough space to hold all the blocks that you want to use. It is like a hotel where you want to stay but has no vacancy.
Conflict miss happens when the same location gets two blocks but doesn’t have enough space for both of them. In an easy example, it is like you are supposed to stay on the third floor of a hotel but all the rooms on the floor are occupied and there is no room for you.