When I arrived at Q's bar on Wilshire Boulevard in Brentwood, I walked past a row of beer taps and pool tables and up a flight of stairs that led to a large cordoned-off room draped in navy blue stars. I had on a grey sweatshirt and, as I shuffled in, I could feel the eyes of the room glance curiously in my direction. Brentwood, a neighbourhood in Los Angeles, is not the place you expect to find a couple of dozen raucous Dallas Cowboys fans.

But on the second floor of Q's, on a chilly Monday evening last December, that's exactly what I found. American football fans wearing jerseys emblazoned with the name of Cowboys quarterback Tony Romo were greeting each other and embracing before settling in for an important late-season game against the Chicago Bears. It was as if I'd been transported to the bowels of the Cowboys' home Stadium in Texas.

I'd actually walked into a weekly meeting of the Westside Dallas Cowboys Connection, a group that gets together in the fall, on Sundays and Mondays, to watch the Cowboys play. But because I don't know the culture of being a Dallas Cowboys fan, I felt like I'd stumbled into a secret society meeting. I was hoping to blend in and observe, like an anthropologist with a notepad, so I decided to grab a seat near the back.

My own life as a sports fan began when I was still a kid living in LA. Despite the domination of their ever-glamorous crosstown rivals, the Los Angeles Lakers, it was the cellar-dwelling Los Angeles Clippers I fell for. I went to watch their basketball games at the old Sports Arena, and stayed up well past my bedtime to listen to the play by play, imagining the games were going on in the next room.

I didn't know any other Clippers fans growing up, and that was kind of the point. I identified with the players and imagined their struggle to win games matched my childhood struggling to find a niche in the world. Soon 'they' became 'we', and although 'we' weren't the best or coolest team in the city, we understood each other, the players and I. That was fandom to me: a security blanket, a glorious, sprinting, jump-shooting (and often missing) security blanket, and as a kid I'd never thought about it in any other way.

My experience as a professional basketball player showed me a different side of fandom. After starring at an American college, I spent 10 years in Europe playing as a pro. Suddenly, and by suddenly I mean almost the moment I stepped on the court for my first professional game, an invisible wall had materialised, a wall that separated me from the cheering, booing masses. The wall would sometimes vanish for a moment or two, when things were going well, but it always reappeared quickly. As the years passed, I felt myself becoming more and more alienated from the fan experience and, on some level, I even began to resent fans.

I retired from professional basketball a few years ago, a move that gave me some much-needed distance from the player-fan dynamic. Having seen both sides of this strange social relationship, I have lately begun to wonder: what does it mean to be a fan?

After hanging out at the back of Q's for a while, I decided to move closer to the jumbotron-sized screen. I found an empty stool next to Eric and Priscilla, two fans who were both wearing Dallas Cowboys shirts and exchanging playful banter. Although they were both 'lifelong' Cowboys fans, neither had been to Dallas until a few years ago, and neither knew much about the city itself.

Eric told me that the first time he saw the Cowboys was on TV. He was an eight-year-old living in central California, and the experience had been akin to love at first sight. The Cowboys have been known as 'America's Team' since the National Football League (NFL) dubbed them that in 1978, on account of their enormous popularity. In a recent poll by the TV channel ESPN, the Cowboys were the most popular professional American football team, and the most popular team among women across all US sports.

Priscilla's story was similar. She grew up in Wisconsin, home of one of the Cowboys' rivals, the Green Bay Packers. But she'd been a Cowboys fan for more than 40 years, since the days of the flamboyant quarterback Roger Staubach, whose games she used to watch with her uncle.

Most sports fans are first struck by fandom between the ages of 8 and 12. The reasons people choose to root for a particular team vary, but a study using data sourced from Facebook found that on-field success is a major factor in fan attachment. The study looked at baseball fans from several different age groups, and found that when a team wins the World Series in any given year, eight per cent more eight-year-old boys become fans for life (for girls, the age of initial attachment isn't quite as rigid).

his voice trailed off and his eyes widened. 'Run him over,' he yelled at the gigantic TV. 'Run his ass over'

The work of Juan Pascual-Leone, developmental psychologist at York University in Toronto, seems to confirm the Facebook fandom study. He says that children in these early stages grasp the concept of a goal, such as scoring a touchdown, or winning a game, and they are able to keep that goal in focus while the operations needed to achieve it are performed. This revelation is exciting for kids, and teams that repeatedly trigger the goal's psychological reward create more long-term attachments in children.

Back on the screen in Q's bar, the Dallas Cowboys struggled in the second quarter, after their offence stalled and the Chicago Bears' backup quarterback threw a second touchdown. Eric's playfulness vanished. He turned to me at one point, and said: 'You know, I envy those guys who don't care about football, or sports in general. They just go through life with their…' Then his voice trailed off and his eyes widened. 'RUN HIM OVER,' he yelled at the gigantic TV. 'RUN HIS ASS OVER, DEZ.'

The player Dez Bryant had broken a tackle and now lunged for a first down. But, instead of watching the screen, I glanced around at the room, just in time to see every person there either stand up or throw their arms skyward. This sort of thing happens 20 to 30 times a game but, to really see it, you have to take your eyes off the screen and watch the audience instead.

This momentary surge in fan excitability could be attributed to 'mirror neurons', a batch of brain cells located primarily in the premotor cortex, which fire whether we're performing or observing an action, according to some neuroscientists. Mirror neurons are still controversial, but their proponents think they could be used to explain aspects of autism, human evolution, and even fandom. As the neuroscientist Vilayanur Ramachandran of the University of California in San Diego put it in a TED talk in 2009, mirror neurons 'dissolve the barrier between you and [other human beings]'.

The dirty little secret of sports fandom is that it's not that enjoyable when your favourite team is ranked number one and you beat everyone

Mirror neurons could help explain why we jump out of our seats when our team makes a big play: we identify with the action on the field at a physical level. When Dez Bryant rips across the hash mark, Eric's mirror neurons might be firing ecstatically, as though he is the wide receiver. Still, it must be stressed that mirror neurons aren't proven, and indeed, some researchers outright deny their existence.

But whether mirror neurons exist or not, the fans inside Q's definitely seemed to twitch and tremble with each Cowboys movement. I mentioned this eerie miming to Priscilla during a break in action. 'We do get really into it here,' she said laughing. 'It's like our church.' She was right, but the difference is that religious comfort comes from knowing the outcome of your life, whereas the pleasure of sports derives from its unpredictability.

The dirty little secret of sports fandom is that it's not that enjoyable when your favourite team is ranked number one in the polls, and you beat everyone by 30 points. During the 1980s and '90s, if the Los Angeles Lakers didn't win the US National Basketball Association (NBA) title, their fans considered it a disastrous season. But when my beloved, last-place Clippers beat the best team in the NBA, or any team in the NBA, it felt like winning a championship.

This might seem obvious but there is a neuroscientific reason for it. With each high and low, our brain reacts by releasing a neurotransmitter called dopamine – the chemical that's released in large quantities during a cocaine binge or a night strung out on methamphetamines. This is the same chemical that is released in tiny dosages during sex, or when we eat chocolate. When someone says: 'I could never stop rooting for my team,' there is in fact some truth to that.

'Dopamine is tied into your memory. If you pull a big upset, you remember how great that feels,' said Eric Simons, author of The Secret Lives of Sports Fans (2013). Those moments, and the neuronal splash they make, are etched into our memory, which is why we root for the team over and over again. It's the victories that occur against all odds that we desperately crave.

The Dallas Cowboys ended up losing to the Chicago Bears. When the game was over, the fans lumbered out of Q's, looking defeated. I said my goodbyes to Eric and Priscilla, but decided to linger inside for a few minutes more.

The TV was off, the lights were on, and the roar and buzz of the crowd had vanished – as though the whole spectacle had never happened. The ambience reminded me of a scene from the US movie Fever Pitch (2005), where three diehard Boston Red Sox fans are sitting at a bar, drowning their sorrows over a particularly difficult loss. One of them glances across the room and spots a few of their baseball team's players having a blast out on the town, looking like they don't have a care in the world. He snickers with disgust: 'We're sitting here dining on our guts over the Red Sox. And there three members of the Red Sox are eating – with gusto?' The character played by Jimmy Fallon replies: 'I kind of envy these guys… they understand something that we don't. Their whole life isn't out in that field. It's their job. It's not an obsession.'

What I find the most interesting about this scene is how oblivious the players are to the fans who are dissecting their every movement. The fan-to-player relationship is para-social, which is why fans often feel comfortable screaming at players, or booing them – behaviour that would never be tolerated in normal social interactions.

'It infuriates me sometimes,' said Charles Ramsdell, a professional basketball player in Europe. 'A lot of fans seem to change their opinion of you based on if you made your last shot. The problem is, it's often personal – they struggle to separate the player, the mercenary, from the person off the court.'

The fans see a false reflection of themselves in players, and they project their interests and emotions onto them. And players do the same thing

I never saw this side of fandom when I played in college. The relationship between player and fan was a simple one then: we played and they cheered. But in the professional ranks, things changed, as I saw firsthand when I was booed for playing poorly in Spain. I expected the media and management to judge me harshly on every aspect of my performance but, naively, I thought fans would be supportive as I went through a rough stretch during a key game. But as the boos, curse words and even debris rained down on my team and me, I realised that fans and players have vastly different outlooks.

It can be difficult for fans to understand that many players are just mercenaries thinking about the next contract, or locker-room dynamics, or their relationship to management. A player's life trajectory is caught up in each new game, and each new season. That isn't to say that being a fan is easy, or that it's a naive pastime. The emotional ups and downs of fandom are genuine and worthy of respect. It's more that the player-fan relationship works as a two-way mirror. The fans see a false reflection of themselves in players, and they project their interests and emotions onto them. And players do the same thing. Having created some emotional distance from my playing days, I can see that there's another side to fandom. Watching the Westside Cowboys Connection jump up with every movement of their favourite players, and remembering my experience as a child watching the Los Angeles Clippers, I realise that fandom isn't exclusively about your team, or the players on the field. At its core, fandom is a type of self-expression.

Eric and Priscilla and everyone else at Q's were seeking an emotional high, sure. But they were also seeking connection to their neighbour, their family or a larger community. Something about their fandom expressed a deep fact about them to the outside world and, in doing so, helped them to find fellow travellers. In this way, perhaps, fans and athletes are nearly identical.