Definition
Attributes are metadata you add to classes, methods, fields, or parameters. The compiler stores them in the assembly, and tools read them with reflection. Unity uses attributes such as SerializeField to keep a field in a scene or prefab, and RuntimeInitializeOnLoadMethod to run a method when the player starts.
Relevance
Attributes are how you tell Unity and other tools about code without changing what the code does. A private field with no attribute is invisible to the serializer. Add SerializeField and the same field is saved and loaded. The attribute is data for a tool, and anything that reads the assembly can see it.
Example
A private field coins is not saved with a prefab. You mark it with SerializeField. Unity then writes the value into the prefab and restores it when the object loads, while the field stays private to other scripts.