This elegant script appeared in India most certainly by the 5th century BCE, but the fact that it had many local variants even in the early texts suggests that its origin lies further back in time. There are several theories on to the origin of the Brahmi script. The first theory is that Brahmi has a West Semitic origin. For instance, the symbol for a resembles Semitic letter 'alif. Similarly, dha, tha, la, and ra all appear quite close to their Semitic counterparts. Another theory, from a slightly different school of thought, proposes a Southern Semitic origin. Finally, the third theory holds that the Brahmi script came from Indus Valley Script. However, at least in my personal opinion, the lack of any textual evidence between the end of the Harappan period at around 1900 BC and the first Brahmi and Kharoshthi inscriptions at roughly 500 BC makes the Indus origin of Brahmi highly unlikely. Yet on the other hand, the way Brahmi, and its relative Kharosthi, works is quite different from Semitic scripts, and may point to either a stimulus-diffusion or even indigenous origin. The situation is complex and confusing, and more research should be conducted to either prove or disprove any of the theories.
Brahmi is a "syllabic alphabet", meaning that each sign can be either a simple consonant or a syllable with the consonant and the inherent vowel /a/. Other syllabic alphabets outside of South Asia include Old Persian and Meroïtic. However, unlike these two system, Brahmi (and all subsequent Brahmi-derived scripts) indicates the same consonant with a different vowel by drawing extra strokes, called matras, attached to the character. Ligatures are used to indicate consonant clusters.
The following chart is the basic Brahmi script. There are many variations to the basic letter form, but I have simplified it here so that the most canonical shape is presented.
And an example of strokes added to indicate different vowels following the consonants /k/ and /l/.
The Brahmi script was the ancestor of all South Asian writing systems. In addition, many East and Southeast Asian scripts, such as Burmese, Thai, Tibetan, and even Japanese to a very small extent (vowel order), were also ultimately derived from the Brahmi script. Thus the Brahmi script was the Indian equivalent of the Greek script that gave arise to a host of different systems. You can take a look at the evolution of Indian scripts, or the evolution of Southeast Asian scripts. Both of these pages are located at the very impressive site Languages and Scripts of India. You can also take a look at Asoka's edict at Girnar, inscribed in the Brahmi script.