Art probably began as a form of communication or record-keeping. Archaeologists and anthropologists have speculated that the early cave paintings found throughout the world are records of tribal hunts or hunting seasons, because of the proliferation of repeated animal figures. Later, such figures probably took on a symbolic importance. Just as you or I might find that pleasant things happened each time we wore a certain shirt, and take to thinking of that shirt as "lucky," so too early people may have associated animals, plants and people with good and bad luck, seasonal changes like floods or snow, successful hunting and other things important to hunting and gathering lifestyles. So eventually, we see artifacts discovered which show an attempt at more than just record-keeping -- carved figures of women, for example, or small animal figurines. Even utilitarian objects like knives and arrowheads begin to show some attempts at craftsmanship in the elaborate way the edges were chipped and feathered to a point. The implication is that early craftsmen became interested not just in the usefulness of an item, but also in its appearance.
This trend continued throughout many ancient civilizations, and no doubt images of ancient Egyptian mummy cases, Greek statues, Byzantine mosaics and Buddhist reliefs leap to mind when we think about ancient art. Much early art was religious, perhaps because religion provided an index of easily referenced symbols which could be mass-produced -- perhaps because at those early stages, when much art was primarily symbolic, religion was an easier topic than any other.
Whatever the reason, in many cultures we see the growth of secular art coinciding with the growth of a new kind of art, one which focuses on people and everyday events rather than idealized spiritual and mythical figures. Portraits, classical busts, and monuments begin to make their appearance. Of course, in many cases, there was still overlap between secular and religious themes -- so rulers of a kingdom were sculpted dressed as Zeus or Poseidon, or Indian reliefs of women look very much like Indian reliefs of goddesses. This trend continued up to the end of the nineteenth-century, in fact, when people were still painting Biblical or mythological scenes with real people as the subjects of the paintings.
Along with secular art came the development of decorative art, which can range from things as large as architecture or formal landscaping, to items as small as a hand-painted tile or a trained topiary. However, in all of these things there is a visible effort to create and mold imaginatively rather than for utilitarian purposes.