Tar is a viscous black liquid which is a derived from the destructive distillation of organic matter. Most tar is produced from coal as a byproduct of coke production, but it can also be produced from petroleum, wood or peat.
Naturally occurring tar pits (e.g. the La Brea Tar Pits in Los Angeles) actually contain asphalt, not tar, and should be more properly known as asphalt pits. Before the development of inherently waterproof substitutes, tar was used as a roofant seal for shingles, and also to seal the hulls of ships and boats and to waterproof sails. It is also a vital component of the first sealed or tarmac roads.
For the computer term, see TAR file format.