Before means at some unknown time before now. It does not indicate when. We generally use the present perfect tense with before.
I have never seen him before.
Ago means at a certain time before now. Ago tells us how long before the present time something happened. It tells us when and gives us a time or a date. Because we are referring to a specific time in the past, the simple past is used.
a. She left about an hour ago.
b. I saw her for the first time at a conference five years ago.
Ago always counts back from the present time. Note that if we are counting back from a past time, ‘before’ or ‘earlier’ or ‘previously’ are used, not ‘ago’:
I met him on a flight to London in December 2010 when he told me that he had permanently moved to Tokyo four years before.
(= 6 years ago; counting back from a past time)