The Sino-Indian War also known as the Sino-Indian Border Conflict was a war between China and India that happened in 1962. There were a number of reasons why China attacked India. In 1959, Indian Prime Minister had met Chinese Prime Minister and said Hindi-Chini Bhai Bhai. Yet China decided to betray our trust and made a surprise attack.
When India got independence, leaders declared a foreign policy that said India and China are two equal and great powers of Asia. China did not agree and wanted to be the only power. Therefore, it first captured Tibet and made it part of China in 1950. In 1959 because of atrocities on the Tibetan people and Dalai Lama (religious head of Tibetan people) fled Tibet, India gave refuge to Dalai Lama and his followers in India.
From military point of view, the border between India and China in Arunachal Pradesh, was drawn by a British shown by Sir Henry McMahon line in 1914. It was accepted by Tibet. But China did not agree and said Tibet was not an independent country and could not make border agreements.
Similarly in Ladakh region, the border between India and China was drawn by a British named Johnson in 1865. This was also not accepted by China.
Under Chairman Mao, China wanted to take settle the border dispute by force in Ladakh and Arunachal Pradesh. Therefore this problem of the border became a reason to have a war.
The Sino-Indian border problem came into focus during the early part of this century. The status of Tibet has been contested by china for long historically, India has border with Tibet. But after the Chinese annexed Tibet forcibly this border became the Sino-Indian border.