Religion is a system of beliefs--a set of collective convictions on matters of spirituality that give meaning to the adherent's life choices and experiences. It is often the collective element that distinguishes religion from personal faith or spirituality; that said, many religions speak of a personal experience or encounter that occurs within the individual frame of reference that cannot be conveyed strictly from the outside. These may take the form of visions, dreams, feelings, thoughts, or even interpersonal experiences that, when seen through the frame of belief, take on a transcendent significance in the believer's life.
Deity is a common feature of religion, although not universal (see Earth's Taoism for an example, and Klingon spirituality, whose texts state that the Klingons slew their deities) and in some cases life forces or truth may be regarded as sacred in a more impersonal fashion. In the case of religions where belief in a deity is present, these can usually be classified as monotheistic (belief in one god) or polytheistic (belief in many gods). For example, the Cardassian Oralian Way centers upon the worship of the deity Oralius and is monotheistic. (DS9 novel: A Stitch in Time) The human religion of Hinduism explicitly lays out a belief in many deities and is therefore polytheistic. Certain systems, however, may be more complex: while named plurally, for instance, the Bajoran Prophets are worshipped collectively, never as separate entities. Most denominations of Earth's Christianity espouse a belief in the Trinity, in which a single deity is expressed in three Persons which appear distinctly and are yet a single force. Hydrans were known to possess a collection of gods but they were free to worship any god separately.
The tenets of a religion are generally codified in some fashion, ranging from oral tradition to holy texts like the Bible (human--Christian), the Prophecies of Bajor (Bajoran), or the Hebitian Records (Cardassian). These traditions and texts are often considered to be, to varying degrees, inspired by or even directly authored by the deities or supernatural forces in question. Rituals, meditation, and prayer are often inspired by or directly prescribed by these traditions and texts, and are usually considered by believers as a way to draw closer to their god or motive force. Ritual objects or even drugs are sometimes involved in these practices, such as the Bajoran Orbs or Oralian recitation masks and the akoonah used by Chakotay, whereas other believers may conduct their prayers without any such aids.
Most believers also say that their beliefs entail that they should live and relate to their fellow beings in a certain manner, and that this affects them in manners that cannot be scientifically observed. Such systems of positive and negative consequences include the Hindu idea of karma or the Abrahamic notions of Heaven and Hell. Analogous beliefs to these, and others yet, have been found in many places throughout the known galaxy.
In some cases, entire societies may organize themselves along religious lines as everything from timekeeping to social institutions to law to leadership may have their roots in religious belief. Bajor may be one of the most well-known examples of this, though an alternate version of Cardassia exhibits a somewhat similar arrangement though differing slightly in degree. (Sigils and Unions: Catacombs of Oralius) Others maintain a strict separation between religious and other sociopolitical institutions. Some societies, such as Cardassia in the prime universe, have actively attempted to suppress religious belief and persecute the believers. (DS9 novels: Terok Nor trilogy)
While majorities in some societies, such as 24th-century Earth, have rejected religion, it should be noted that each society's relationship to its religion differs. For instance, while on Earth and Voth religion was often seen as being in conflict with science, Cardassian believers in the Oralian Way perceived no such difficulty. (VOY: "Distant Origin", Sigils and Unions: Catacombs of Oralius--"The Desolate Vigil") Some worlds have experienced violent conflict on religious grounds or inspired by religion--such as the Dominion, which went as far as to genetically program religious beliefs into its servant races, whereas others, such as the Ferengi, have had little in the way of war on religious grounds. Religion could serve as the impetus for oppression or be abused by the unscrupulous, as befell the Ventaxians and Xindi, or as a catalyst for positive social change such as in the Earth nonviolent protest movements led by Martin Luther King, Jr. and Mahatma Gandhi.