In Spanish there are three adverbs that express distance which are:
Aquí = here
AQUÍ is used to refer to a near distance, i.e near the speaker, the same way it is used in English. Have a look and listen to these examples:
Ahí and Allí = there
Unlike in English there are 2 adverbs to express the notion of there. The difference can be tricky to understand for learners, but basically AHÍ is used to express a "nearer" there than ALLÍ which is even further away. Let's look at each in turn.
AHÍ is used to talk about a middle distance (between the speaker/s and the object or person they are talking about) or to talk about an object or person that is near the listener. Have a look and listen to these examples:
In the first example, the speakers are together and are talking about another person (Fernando) who is a bit further away from both of them.
In the second example, the speaker is pointing at something (el bolígrafo) which is near the listener.
In both cases we use ahí.
ALLÍ talks about a further away distance from the speaker, the same way "there/over there" is used in English.
Have a look and listen to these examples: