Unity uses Globally Unique Identifiers (GUIDs) to track references between Assets. Each has Asset in a Unity project has a GUID, which is stored in the .meta file for that Asset.
When an Asset (for instance a Material) in your project references an another Asset that it depends on (for instance a Texture) it points that asset by GUID. ie. The Material stores a copy of the Texture’s GUID.
The crucial thing to recognise here is that the name of Asset is immaterial to the Unity Editor, it only cares about the GUID for referencing purposes. You can find more details in this guide to avoiding broken references