No one comes up with chants like British football fans. They can be clever and funny or hateful and offensive. But who makes them up? And will they survive in corporate, atmosphere-lite stadiums?

It is a curious noise, an elongated "eeeeeeeeee", as if the Old Trafford crowd are singing a mighty tuning note, harmonising like an orchestra before a performance. Actually, it is just the first word of a song – "Weeeeeeeeee'll drink, a drink, a drink, to Eric the king, the king, the king" – Manchester United's long ode to Eric Cantona, traditionally rattled out before matches start.

It is sung today with particular gusto: these United fans are awaiting a crucial home game against Aston Villa, one that will determine whether they replace hated rivals Liverpool at the top of the Premier League, one that must undo the damage of two consecutive defeats, and maximum volume needs to be mustered.

Not everyone in the 76,000-capacity stadium is singing - some are fumbling with food and programmes; others are half-heartedly clapping along to music on the PA system - but what chanting there is from the home fans is led from the north-west corner, in the vocal J and K stands. Cantona acknowledged, kick-off approaching, the pack direct their attention towards current heroes: a reworked church hymn in praise of Paul Scholes, a few twisted Andrew Lloyd Webber lyrics to eulogise Dimitar Berbatov, and a long-standing song, originally about Gary Neville and brother Phil, that borrows the tune of David Bowie's Rebel Rebel, one so droll it has achieved a kind of infamy in chanting lore.

"Neville Neville, your future's immense,

Nevile Neville, you play in defence,

Neville Neville, like Jacko you're bad,

Neville Neville, is the name of your dad."

Who on earth comes up with these chants? How are they taught? Do they spontaneously erupt one day, like-minded wags hitting upon something that catches? Do they develop over time, added to line by line, as events on the pitch dictate? Or is there some terrace elder who sits down before matches, sucking his pencil and thinking up rhymes for players like Tomasz Kuszczak, for phrases that will embalm the moment Wigan were overcome one-nil?

The idea was once fodder for comedian Paul Kaye, who crafted a sketch about "bespoke football chant composer" Labian Quest ("What's the general sentiment you'd like the piece to convey?" Kaye's character asks a customer. "General poverty, bad housing, a focus on poor diet?"). But such characters do exist. Here at Old Trafford, the near-continuous song in J and K stand is led by a silver-haired, iron-lunged fanatic called Pete Boyle, a man who has had his words sung from the stands for decades.

"I've written hundreds over the years," says Boyle, who teaches his creations to the masses in local pub The Bishop Blaize. "Some that are only ever going to be pub songs, some to sing on the coach, and catchier ones for the terraces."

Boyle was blooded early in the business of football song, riding away-game coaches on his own as a seven-year-old; by the Cantona era in the 1990s, he was indulged as a sort of mascot by the players, friendly with first-teamers who would sometimes request new chants. (Cantona was particularly pleased with "Eric the King", saying of Boyle in an interview: "He is a creator.") Now 39, a little breathless from his years of bellowing, Boyle has settled in to a hybrid role as MUTV correspondent, fanzine contributor, and choirmaster of Old Trafford's noisiest stands.

He can never tell which chants will be successful. "Sometimes I'll put a lot of preparation into a song, but it won't take off. There's no set rule. I tried to start Ole, Ole (Feeling Hot, Hot, Hot) about Solskjaer in 1999, but the crowd wasn't having it. Then I sung, 'Who put the ball in the Scousers' net? Ole Gunnar Solskjaer.' Didn't even think about it. That went massive."

Today, the match 10 minutes old, the home team starting sluggishly, there is little invention from the stands. All the crowd manage are desultory bursts of "United!" "Songs take on a life of their own at away games, because you've got all your hardcore fans gathered together all day," explains Boyle. "Generally away fans out-sing home fans." He is right - it is the Villa supporters who catch the ear today, with a reference to United's far-drawn fanbase ("See you on the motorway!") and a rendition of Kumbaya about Paul McGrath, a former player for both today's teams, that begins "On the piss, my lord, on the piss ..."

Everything changes when United score from a Cristiano Ronaldo free-kick in the 14th minute. Suddenly, songs break out all around the stadium. A few hopefuls even try to get a round started about Park Ji-Sung, even though he's on the bench, singing an adaptation of Lord of the Dance that is catchy, offensive and really quite funny.

"Park, Park, wherever you may be,

You eat dogs in your home country,

Could be worse, could be Scouse,

Eating rats in your council house."

"It's a bit like when there's a prosperous vibe in a city, you see lots of cranes," says Kaye. "When a team's doing well, there's loads of great songs." An Arsenal fan, Kaye knows the pain of having a creation rejected. "I had a moment of inspiration once, when Sylvain Wiltord was playing, and got up on my chair and started singing, 'You're Syl-vain, I bet you think this song is about you.' The response was: 'Fuck off, Dennis Pennis.'"

"It would be nice to think that all chants were spontaneous," says Jonny Hurst, a 42-year-old solicitor from London who was named Britain's first (and, to date, only) chant laureate in 2004, a role he won in a nationwide competition. "But I think there's quite a lot of preparation involved. An opposing player is coming along this afternoon, he's just been caught in bed with so-and-so, what can we sing about that?

"Being chant laureate was a cerebral role. When something important happened in football during my tenure - for example, when Brian Clough died - I would write a chant to be published in the paper. It was an appointment in the style of the poet laureate, there to reflect changes in public life." He ponders a moment. "You've also got to appreciate that this was an appointment made by the marketing wing of Barclays."

As chant laureate, Hurst was paid a £10,000 wage, appeared on Blue Peter, and was profiled in a rather baffling 1,200-word piece in the New York Times. But the job wasn't easy. "Some of the response wasn't massively favourable," he says. "People took umbrage at the fact that they pay good money to go and see their teams and sing chants every week, and there's some middle-class solicitor who gets 10 grand to make stuff up."

On the pitch, John Carew has headed an equaliser. "John Carew, Carew," sing the exultant Villa fans, to the tune of Que Sera Sera, before segueing into "Carew, Carew, Carew is on fire", which steals the chorus line from Rock Master Scott's The Roof is on Fire. It's magpie-like, this borrowing of tunes for chants, the strangest example of which has to be Guantanamera, a Cuban song originally written about a man's love for a woman who made him a steak sandwich, now ubiquitous at football grounds as "You only sing when you're winning", as "You're getting sacked in the morning", as "You're just a fat Eddie Murphy", as just about every footballing insult imaginable.

And – wow – are the insults imaginative, the United fans at one point singing a many-versed epic called In Your Liverpool Slums that is mostly unprintable. Football fans have never been afraid to be tasteless, and there aren't many topics they shy from, be it run-ins with the law ("Robinho, she said no, Robinho, she said no", shortly after the Brazilian's arrest on suspicion of rape – no charges were brought), mental problems ("Two Andy Gorams", after the goalkeeper was reported to have schizophrenia, "there's only two Andy Gorams"), or global conflict (at Liverpool's Israeli player Yossi Benayoun in recent months: "The Gaza's not yours! The Gaza's not yours!").

"Football chanting is a kind of animal, impulsive instinct," explains Andrew Motion, the outgoing poet laureate. He has always been fascinated by it - describing terrace song as "a natural upswelling of rhythmical thinking and feeling" - and believes the chants can have literary merit. "They can be bracingly vulgar, but they can often be very funny, and sometimes quite ingenious. Poetry is a simple, primitive thing and, although it's unusual to find football chants being elaborated to the point at which they'll make anything that resembles a poem as we ordinarily understand it, they are an aspect of poetry."

Motion sees them as a modern folk poetry, and believes they should be collected and preserved. Boyle says they already are. "We sing about George Best, Willie Morgan, Paul Parker, David Beckham, Brian Kidd. There are songs about Blackburn from 1994, about Newcastle from 1996. It's all about recording a club's history."

It is the second half at Old Trafford, and the home fans are silent. Aston Villa have just scored again. "Gabby, Gabby, Gabby Agbonlahor," sing the bouncing away fans of their goalscorer, to the tune of Karma Chameleon. It is a miserable thing when the away team are in ascendance at a football stadium - the grim silence of a majority, terribly exposed by the noisy glee of a minority - and it is all too much for one red-faced United fan in the south stand. "Get up!" he screams, swivelling to berate the seated masses behind him. "Wear the shirt! Wear it with pride!" It is a moving performance, hardly spoiled when he pulls off his jumper to reveal the blue and white stripes of an Argentina kit underneath.

His choice of shirt is either a homage to United's tireless striker Carlos Tevez, or an example of Old Trafford's curious, decade-long practice of singing songs in praise of Argentina, which dates back to the abuse David Beckham suffered after his red card in the 1998 World Cup. But it is fitting that this angry man with his back to the pitch should be wearing such a shirt, because it recalls the way fans in South America and Europe really are conducted by just such figures. "You could call them ultras cheerleaders," says Italian football pundit and journalist Gabriele Marcotti. "Fans who stand with their backs to the games, banging drums, leading the chants and deciding which players are going to get songs."

Chanting in Italy, in particular, has always appeared rather cultured when compared to our own. Refrains are lifted from Verdi operas Aida and Rigoletto, and in an instance of almost operatic nobility, a chant among Napoli fans about Maradona ("I saw him, and now I can die") was once officially retired, the fans vowing never to sing it unless the Argentinian somehow returned, Messiah-like, to play for them again.

But Marcotti argues that British chants have one key ingredient over their Italian counterpart: humour. "As an outlet for witticism or anger or support, Italian football culture has evolved towards the making of banners," he says. "And in many ways that's a more effective medium, because once they're displayed you don't have to strain to understand them." Notwithstanding a few witty lyrics - there's a song about striker Toto Schillaci stealing the hubcaps from Alfa Romeos - Italian fans tend to keep it simple: roaring a player's name to the tune of the White Stripes' Seven Nation Army, for example, a riff massively popular at Serie A grounds since it became Italy's unofficial anthem at the 2006 World Cup. "The banners have probably stunted the growth of song," concludes Marcotti.

Is the funny football chant, then, a peculiarly British institution? In Spain, excepting the spirited work of fans from Cádiz, who sing "referee you're gorgeous" for the sheer hell of subverting the conventional abuse of officials, chanting for laughs is rare. In Greece and Turkey chants tend to be angry and political; in Brazil and Argentina they are impassioned and often rude; but few are ironic. Germany might come close - one team is known for berating its substitutes for only being substitutes - but nowhere does humour and mischief seem as important in chanting as it does to us. "I can't imagine any other country coming up with all six or seven verses of In Your Liverpool Slums," says Marcotti. "I really can't."

At Old Trafford, frustration builds to an almost unbearable point before the relief: Ronaldo scores again, this time with a missile from outside the penalty box, and the score is 2-2 with 10 minutes to go. The grumbles become roars of encouragement, and the crowd start singing once more: "Viva Ronaldo, running down the wing, hear United sing." And the players do seem to hear them sing, visibly playing with more energy.

It is a precious idea to fans, that chanting and singing can affect a match. Stoke City manager Tony Pulis has gushed for seasons in his praise of home support at the Britannia Stadium (the Premier League's noisiest ground, according to a recent survey). Players at Middlesbrough, in contrast, have complained at the lack of chanting at the Riverside, with Jérémie Aliadière pleading in October: "We need the fans with us, we need to make other teams come to the ground scared." The situation was hardly helped when the club sent a letter to fans in February, asking that they be quieter in certain sections of the ground so as not to disturb the tender-eared majority.

Few examples are as overt as Middlesbrough's unfortunate letter, but any decline in crowd volume is often a club's own fault, argues football sociologist and historian Dr Gary Armstrong. "The game sanitised in the 1990s, and football was caught in a cleft stick," he says. "It wanted to sell itself on atmosphere, but an atmosphere that would appeal to the corporate middle class. They wanted 'atmosphere lite', which meant they didn't want songs that were rude, transgressive or offensive." One of the most extreme examples of this, he points out, was at Highbury, in 2004, when Arsenal handed out an officially approved songbook to fans. "It had no swear words in it, and it wasn't offensive to Tottenham," says Armstrong. "It didn't work."

The chant has long been something football authorities have sought to control; as long ago as 1907, Sheffield United produced match programmes asking fans to desist from calling out advice. But this season saw a giant leap in restrictive effort; 11 Tottenham supporters being charged with "indecent chanting" at Portsmouth defender Sol Campbell at Fratton Park. Campbell once left the north London club for rivals Arsenal, becoming a target of Spurs fans' abuse ever since, and the feeling that once prevailed among fans and pundits was: what else did he expect after such a high-profile move between rivals?

But opinion has shifted, hardened, perhaps, by the abuse of England's black players on visits to Spain in 2004 and Croatia in 2008, or the allegations of Islamophobia against Newcastle fans in 2007 for chants about Egypt striker Mido. The same year there was a debate as to whether Tottenham fans, traditionally predominantly Jewish, were being antisemitic by calling themselves "yids". Football spectators, once able to blare whatever they liked from the stands, are being held to account for the content of their chants.

"Often people just want to join in with something celebratory or carnivalesque, and it could almost be said that what's being chanted doesn't really matter to them," says Professor Mike Weed, of the faculty of sport at Canterbury Christ Church University. "So you will get people at England games singing 'No surrender to the IRA' or 'If it wasn't for the English you'd be Krauts' without fully realising that that's being racist. They think that's just what you do at football."

Armstrong explains that this is because the football ground is a "liminal zone", a place where "all bets are off" and people behave in uncommon ways. "It's a bit like going to the seaside," he says. "You might dress up in stuff you wouldn't normally wear, a fluorescent nylon shirt advertising some corporate entity, then consume lots of alcohol and shout advice to a bunch of men about how to do their job properly. Football offers a good old-fashioned excuse to hate people, to hate the opposition. But for most people, it's contextual."

That's not the opinion at Portsmouth magistrates court. Four of the men accused of harassing Sol Campbell admitted homophobic chanting at their preliminary hearing; seven others pleaded not guilty and will stand trial this month. The football chant is under greater scrutiny; it may also be under great threat.

The match at Old Trafford has ended spectacularly, United somehow winning after an impossible curling goal from unknown 17-year-old substitute Federico Macheda. In the press box, journalists are rapidly typing up reports; in the stands, other scribes are hard at work. "There was no song for the kid," Boyle explains later. "Nobody had heard of him!" So after the winning goal, the crowd do what they do best - they appropriate. "Viva Macheda," they bellow, replacing Ronaldo in his own song with merciless haste, "only 17, he's a goal machine..."

"Chanting is a reminder of a basic pleasure from childhood," says Andrew Motion, "that of rhyme and repeating words in the corner of a playground. But there's also a sense that chants can make you powerful, can make you sort of neuter the opposition." And how have Aston Villa's fans been neutered. It is impossible not to feel sorry for them, roaring away for most of the second half, delighting in the quietness of the home fans with ditties like "Shall we sing a song for you?", and now receiving the inevitable wrath in response. The song directed their way is not an Old Trafford original, it is not as inventive as one of Pete Boyle's epics, it isn't even funny. But it is the chant that hurts the most. "You're not singing," comes the awful truth, "you're not singing, you're not singing any more."