Play, as traditionally defined, are those behaviors and actions undertaken for the purpose of enjoyment
. Common across the animal kingdom, play is traditionally associated with and most frequently engaged in by the young, though by no means exclusively. Part of many common definitions of play are implications of purposelessness, or of enjoyment as the only product. While fun may be the only direct or intended consequence, play is in fact far from purposeless, and very often serves to train or practice players in skills very relevant to "real life".
Some of the most obvious examples of this are seen among other animals. Wolves nipping at each other are learning how to hunt and perform in inter- and intra-pack conflict, and that cute kitten batting at a ball of string and dashing about for no apparent reason will grow up to be a cat that may have to pounce on rodents and flee from predators. These undertones of survival and hunting skills, often regarded as cute at best and primitive at worst, are fundamental to much human play, though we frequently overlook it.
Coming to humans, in the early years of life, we engage in simple recreation - playing peek-a-boo, touching and moving nearby objects, projecting fantasies onto the environment, and in doing so we develop a sense of our environment as distinct from ourselves and learn the underlying principles and ways we can interact with that environment. As mobile, slightly older children, we run about aimlessly, climb trees, and play at games like tag, hide and seek, sharks and minnows, and blindman's bluff. Yet too small, slow, and weak to put up an effective fight, we must learn to flee and hide from enemies and predators. Stealth is often our best or only weapon.
As we grow and get stronger, more direct contact begins to enter our games. In red rover we try to repel an attack. In king of the hill we take and defend territory. In smear the queer we knock the shit out of people, and in return, get the shit knocked out of ourselves. Wrestling and play-fighting are fairly transparent precursors to grappling and hand-to-hand combat, and capture the flag to actual battle. Of course, war isn't the only thing we're preparing for. As we gain command of speech, math, and fine motor control, we begin to play counting, verbal, and clapping games, practicing and refining these skills. At this point, you might want to take some time to look over the children's games metanode - almost every single game listed fits the models laid out here.
Further growth and the onset of adolescence brings more team and organized games - humans learned many millennia ago, before they were even humans per se, that hunting was most effectively done in coordinated packs, and soon after applied the lesson to combat. The physical realm aside, with the stabilization of a sense of self and the development of distinguishable personalities come the social games that are a big part of why so many children hate secondary school. We form and break alliances, maneuver for position and social advantage, attempt to influence others to adopt and support our positions, and take our first stabs at attracting a mate and creating a relationship, even in the absence of any intention to reproduce. (Aside: is sex with contraception play in this sense? Discuss.) We do this all so lightly because the games are not ends in and of themselves - indeed, as many geeks and outcasts reassure themselves, no one does care who you were or what you did in high school - but once again, practice of skills vital for later life among a social species.
Just as the development of skills through training and formal study doesn't end with childhood, neither does play, although the completed mastery of fundamental survival and life skills is as good an explanation as any for why adults tend to engage in it less often. Traditionally, soldiers have been known for violent recreation, but is it any surprise that individuals whose lives and livelihoods depend on personal fighting skill and the ability to function as part of a team might engage in sparring, barroom brawls, pick-up games of basketball, or as I encountered the better part of a Marine squad in the course of a 36-hour game last year, paintball? Higher up, in the officers' quarters, the playing of strategic games like chess and go has long been recognized as a useful way of developing a sense of tactics with regards to territory, maneuvering, and foresight in battle, and records suggest that they may have been developed for this exact purpose. (The key, as many edutainment producers have forgotten, is that the learning aspect should be as transparent as possible, and not fundamental to enjoyment.)
Again, war, while a fairly clear example, is not the be-all and end-all of play. My friends at school are mostly english majors, and when they assemble, before too long they often begin marathon sessions of classifying things, drawing parallels, and passing judgement - if all the famous German philosophers were at a party, which ones would be smoking pot on the porch and who would be leaning awkwardly against the wall? Now how about member states of the European Union? Schools of literary theory? Many of the mathematicians and computer scientists I know are big gamers, tending towards board and card games in which complex systems arise from simple numeric bases. Myself? Well, I'm in training to become a cultural historian, and for recreation I write things like this. If you look at your life through this lens, I'm sure you'll be able to find similar examples among those you know.
Of course, not all play fits this model. What, then, of golf? While there are certainly social aspects to it (q.v. dannye), those neither represent a central facet of the game nor anything particularly new for its players, and it certainly doesn't offer much applicable practice in the physical realm that couldn't be obtained elsewhere. If its association with the rich and the elderly, who would appear to already know all they need to be on top of things, might account for some of this, then the existence of cricket, at least, is proof that as institutional religion can be abstracted from spirituality enough to render the connection between the two weak or nonexistent, so can sport and recreation be abstracted away from any basis in play as a learning tool. Despite a tendency to lean towards functionalism, even I think it would be silly to demand ulterior motives of all play. The central concept, the reason it's so often effective as a learning, the thing that distinguishes it from more formalized learning, is that we like to do it, and that is the reason that we can fairly expect it to be a common feature of society as long as humanity remains.