Chan is a school of Mahayana Buddhism, also known as Zen (Japanese).  This word is derived from the Sanskrit "dhyana", which means "meditation".  The Shaolin Temple is considered the ancestral home of Chan Buddhism since Chan Buddhism was established by South Indian monk Damo (Bodhidharma) during his nine-year meditation in a cave on Mount Wuru behind the temple around 527 AD.  Damo is recorded as having come to China to teach "a special transmission outside scriptures" which did "not stand upon words". 
Chan is also thought to have developed as an malgam of various currents in Mahayana Buddhist thought and of local traditions in China.  As the center of Chan Buddhism, the Shaolin Temple attracted many emperors' attention in China's history.   The Empress Wu Zetian (625-705) paid several visits to the Shaolin Temple discussing Chan philosophy with high monk Tan Zong; the founder of Yuan Dynasty, Kublai Khan (1215-1294) ordered all Buddhist temples in China to be led by the Shaolin Temple; there were eight Princes during Ming Dynasty turned themselves into Shaolin monks.