Cowboys and Indians is a very old childhood game, with roots extending further back than even the romanticized historical period from which it springs. Its formal use has declined over the years, as sensitivity has increased regarding the historic treatment of Native Americans, but the basic tropes can be found through dozens of different variations (cops and robbers being the most obvious). Through the use of such pretend, children learn to interact with their environment and each other, as well as taking on the roles of adults in a safe and non-threatening manner.
Choose sides. One group of children serves as the cowboys and the other group serves as the Indians. In some cases, the sides can wear bits of costume differentiating one from the other, but it isn't necessary.
Divide up the territory where the game is being played. It can be a backyard, a park, or anywhere that makes running around easy and fun. It represents the wild frontier, which the cowboys are trying to settle and explore, and the Indians are trying to protect from interlopers. Half the team starts out on one side of the territory, half the team on the other. Alternately, choose one part of the territory--such as a large rock or a jungle gym--for one team to "defend" while the other team "attacks." If the cowboys are the defenders, the spot can be a wagon train or a remote homestead. If the Indians are the defenders, it's their native village coming under attack.
Try to stay hidden from the other team until you get close enough to take a "shot" at them. The object is to use the territory to your best advantage: keeping rocks, bushes and similar pieces of cover between you and them.
If you see someone from the other team, start "shooting" at them. Cowboys should point their fingers like guns and make "bang-bang" noises, while Indians should mimic firing bows and arrows.
Play dead if someone "shoots" at you and you're not behind cover. Make your death appropriately dramatic; arms flying up in the air, body writhing on the ground, etc. No getting back up after you're "dead."
Continue playing until one side or the other is "dead," then get up and start the game all over again.
Rules for cowboys and Indians are flexible in the extreme, and needn't be adhered to if everyone is having fun. The ubiquitous "You're dead!" "No I'm not" arguments practically go with the territory.
Parents may be troubled by the violent overtones of cowboys and Indians, but it's usually quite harmless. The main concern is labeling one side or the other "bad guys," which is no longer considered appropriate (unlike cops and robbers, which has very similar dynamics, but a much more clear-cut sense of morality).
The one inviolable rule in cowboys and Indians: no touching. You can pretend to shoot someone all you want--or even engage in hand-to-hand combat with a knife or invisible rope--but the action has got to stay pretend. Supervising parents should make that clear from the get-go.