adverb, noun which may take the genitive case particle 'no'
a few years ago; some years back
Refers to an unspecified time several years in the past. Can be used adverbially or with の to modify a noun.
数年前にこの町に引っ越してきました。
I moved to this town a few years ago.
それは数年前の出来事です。
That is an event from a few years ago.
I moved to this town a few years ago.
I've been studying Japanese for a few years now.
I was sorting through photos from a few years ago.
数年前 pins the past down to a few years, whereas 昔 is much vaguer and can mean anything from years to centuries ago.
数年前 means "a few years ago" while 数年後 means "a few years from now," marking the opposite direction in time.
Compound of 数 (several) + 年 (year) + 前 (before). The reading すうねんまえ follows standard on'yomi for 数 and 年, with 前 read as まえ.