Each of the three gods -- Brahma, Vishnu and Shiva -- who are part of the Trimurti originally played an individual role in Hindu culture and mythology. How and when they started to represent the god together is still not completely clear.
There are many interpretations of Trimurti. A strongly accepted interpretation says that Vishnu, Shiva and Brahma together represent the three elements: water, fire and earth. Others believe that these gods represent different things on different planes. Physically, Brahma is the sky, Vishnu is the sun and Shiva is the moon. Spiritually, Shiva symbolizes the physical principle, Vishnu symbolizes the psychic principle and Brahma symbolizes the spiritual principle. Psychically, Brahma represents intuition and creativity, Shiva represents emotions and Vishnu represents intellect and intelligence.
The Trimurti concept is most prominent in the Hindu denomination of Smartism, which emphasizes the oneness of all five (or six) Hindu deities as expressions/personifications of the Supreme Divinity. However, the Trimurti is largely rejected by other major denominations, such as Shaivism and Vaishnavism.