Hibernate's first level cache sits within your Hibernate session. It has a short lifespan and there are as many first level caches as you have Hibernate sessions. Typically one session per user request in a web application.
The first level cache contains all objects used in a session, also dirty objects that haven't yet persisted to the underlying DB. Once you flush your session, all dirty objects in the first level cache will be propagated through the second level cache, and saved to your database.
There is only one second level cache, that serves as a cache between your DB and all first level caches in your sessions. So, when someone loads an object from the DB, it will be held in the second level cache. That way, when someone else loads the same object, it will not come from the DB, but rather from the second level cache. Objects stay in the second level cache until they are no longer needed, depending on your cache eviction policy.
When someone changes an object and flushes it to the DB, the object changes in the second cache as well. Users already have the same object in their first level cache and try to change and flush it will thus get an exception.