Recently, in a magazine, I read the following line:
It's been an eventful year and boy, has it flown past!
My question is, what does the word "boy" mean here? Is it an idiom? What is its usage?
Boy in this usage is an interjection that is an exclamation of surprise, wonder, contempt, etc. In this particular sentence, it's just emphasizing how quickly the year has flown by.
You hear it pretty frequently in the "Oh Boy!" which used earnestly usually indicates excitement about something (or when used sarcastically, expresses dread).
gee whiz are similar expressions you might hear in these contexts as well.
crikey fills the same function but is limited to UK/Australian English.
A less common usage is "man."
"Man, this is great."
It is a way of addressing no one in particular.