What does it mean to "have a moment" with someone?

So today after school, me and my best guy friend/crush were walking together slowly on the sidewalk about a block from school and just having a random conversation. Then, one of our mutual friends came up behind us on his bike and braked really loud to scare us. I screamed and our friend teased, "I'm sorry, are you two having a moment?"
What did he mean by that?
What does it mean to "have a moment" with someone?
Post Opinion