Nagas are serpentine creatures with powers to affect human beings through diseases etc and they are said to hold wisdom in their watery kingdoms. They usually live in the oceans but sometimes they inhabit rocks and trees. They are worshipped as divine beings that have the power to bring or withhold rain. They are also used as ornaments by some tantric deities and are believed to be protectors of Buddha's doctrine.
There is a story about Buddha giving the Prajnaparamita texts to the nagas for safekeeping until the birth of someone who was able to interpret them correctly. This was Nagarjuna who is said to have magically flown to the nagas' city (Bhogavati) and retrieved the hidden texts.
In his biography of the Venerable Acariya Mun of Thailand, Acariya Maha Boowa Nanasampanno talked about the Arhat's encounters with nagas who came for his teachings during the time he was in Chiang Mai. He said that devas and nagas showed great respect for Acariya Mun, and for the place where he lived. They would always avoid the meditation path. Here is a passage from the book regarding the nagas:
"Nagas, too, avoided passage across the pass when arriving for a visit. On occasions when their leader had to pass through that area, he always circled around the head of the meditation path. Sometimes the nagas sent a messenger to invite Acariya Mun to attend a function, much as humans do when they invite monks to local functions. The messengers always avoided crossing his meditation path. Occasionally, when they were unable to avoid crossing over some of the sand ..., they would first sweep the sand away with their hands, and then crawl across. Standing up again, they walked to Acariya Mun's residence. Their behaviour was always wonderfully composed. Acariya Mun believed that if human beings, the custodians of the sasana (Buddha's teachings), have a true interest in Dharma and a deeply-rooted feeling of genuine respect, they should exhibit the same reverential behaviour toward the sasana as devas and nagas do." (p. 230-231)