Hello Friend,
In this case, the basic principle of Database enters.
When a user starts reading it takes 'an image' from the database at that moment. And there is what we call isolation.
One user's access is isolated from the other. if another user accesses the same table and makes a recording the first user will not see this change until the second commits to his 'operation'.
I am speaking in a very simple way but the truth is that when a user starts a change in the table only he can make the change until he finishes. It is called Exclusive Lock. The user does an exclusive 'begin' lock and makes the change. then when he finishes he makes the 'commit' and releases it for the other 'users'.
Did you understand? otherwise I’ll explain it better.