comes from empirical observation:
"A program spends 90% of its time in 10% of its code"
An implication of locality is that we can predict with reasonable accuracy what instructions and data a program will use in the near future based on its accesses in the recent past.
Two different types of locality have been observed:
Temporal locality: states that recently accessed items are likely to be accessed in the near future.
Spatial locality: says that items whose addresses are near one another tend to be referenced close together in time.