A deity is the object of worship chosen by a creature. Deities are randomly generated during worldgen, and assigned different spheres (the objects, creatures, concepts, etc. they are associated with).
Worship and deities differ among races: Dwarves and Humans worship multiple deities, most of which are often depicted as their own race, though on occasion they may worship a deity that is depicted as an animal or vermin. Elves do not worship a deity, but believe in a single force that permeates the forests.
 Fortress Mode
Each dwarf and many other creatures have one or more deities listed among their relationships. In the case of your dwarves, you can see the degree of belief they profess ("faithful worshipper", "casual worshipper", etc.). Fortress mode does not currently include priests or temples, but does include representations of dwarven deities in statues, engravings or figurines.
Occasionally, under the pretense of human diplomacy, your fortress may be visited by a creature which claims to actually be a deity. Such a creature is, in fact, a demon impersonating said deity in order to control that particular human civilization. It may or may not fill your fortress with flesh-eating toxins.
 Adventurer Mode
In Adventurer mode, Human towns may include temples of various designs inhabited by Priests dedicated to a deity. If the conversation option "Service" is used with any Priest, the deity will be added as an object of worship to the character's record,Verify and it becomes possible to speak to the deity from any location, though the deity will not respond.
 Interaction in the World
Deities occasionally influence events during world generation. Gods of death can create stone slabs from which necromancers learn the secrets of life and death. Furthermore, civilized creatures that profane a temple incur the wrath of its deity, turning into a vampire or a werebeast as punishment.
Certain demons which escape from the Underworld during world generation will impersonate a deity in order to take over Human civilizations, at which point they act as a diplomat and visit your fortress. They will be non-hostile and have the "deity" title. Depending on the demon, Fun may be had.