India and Pakistan have long been at odds with one another, mainly due to ethical and religious conflicts, territorial disputes, and as a larger outgrowth of Cold War policies that saw India appeal to both the United States and the Soviet Union in its conflicts with Pakistan. Tensions between the countries really began to escalate during the decolonization efforts of the early 20th century.
When the United Kingdom gave up rule over India in 1947, the non-secular, mostly Hindu, state of India emerged, as did two non-contiguous, mainly Muslim regions, known as East Pakistan and West Pakistan. The fact that the country was partitioned, and with India in between, was a source of great animosity. Hostility was focused mainly on the area of Kashmir, which became a part of India, despite Pakistan claiming it as a part of its territory. This conflict is known as the First India-Pakistan War, and it lasted throughout 1947 and 1948.
In 1965, Pakistan tried to reclaim Kashmir by force, leading to the second India-Pakistan War, which ended in a stalemate. The United States and the United Kingdom ultimately sided with India, though both states strived to maintain cordial relations with Pakistan as well. East Pakistan, it should be noted, separated from West Pakistan as a political entity following a civil war in the early 1970s and is now known as Bangladesh as of 2016.
In more recent decades, both India and Pakistan have become nuclear powers. India has stated that it maintains a "no first strike" policy, meaning it will only use the weapons to defend itself, while Pakistan has announced that it would consider using the weapons in a first-strike situation. These differing policies belie the deep mistrust between the two states.