The adverb ago refers to a period of time that is completed and goes from a point in the past up to now. Ago follows expressions of time:
It happened a long time ago.
They arrived in Athens six weeks ago.
They arrived in Athens ago six weeks.
We normally use ago with the past simple. We don’t use it with the present perfect:
I received his letter four days ago.
I have received his letter four days ago.
If we refer to a point in time before a specific time in the past, we use before or earlier or previously, often with the past perfect:
We had got their invitation four days before.
They met on the same island where they had met ten years previously.
If we refer to how long something lasted, we use for (not ago):
When I was at school, I studied Russian for five years. (my studies lasted for five years)