The nation of Israel was divided into two nations in the days of Rehoboam (1 Kings 12). Israel was composed of the ten tribes to the north, and Judah was made up of Judah and Benjamin. The animosity between the Jews (inhabitants of the Judah, the southern kingdom) and Israelites began immediately after the division, as Samaria was the capital city of the northern kingdom (with Jeroboam as her first king). Rehoboam assembled an army to make war against Israel to reunite the kingdom, but God intervened through His prophet Shemiah (1 Kings 12:21-24). Later, in speaking of the reign of Abijam, Jeroboam’s son, 1 Kings 15:6 says “there was war between Rehoboam and Jeroboam all the days of his life.”
Immediately after the division, Jeroboam changed the worship of the Israelites in 1 Kings 12:25-33. No longer did the inhabitants of the north travel to Jerusalem to offer sacrifice and worship (cf Deuteronomy 12:5-14). Instead, Jeroboam set up idols in Dan and Bethel.
Later, after Israel’s fall to the Assyrians, they began to intermarry with the Assyrians, contrary to Deuteronomy 7:3-5. This is why the Jews hated the Samaritans as “dogs,” or “half-breeds.”
The Samaritans were also a continuous source of difficulty to the Jews who rebuilt Jerusalem after returning from Babylonian captivity (Ezra 4, esp v 10; Nehemiah 4, esp v 2).
Eventually, the religion of the Samaritans evolved to the point that they held only the Pentateuch (Genesis-Deuteronomy) as being the law of God, rejecting all the books of poetry and prophecy. Furthermore, they claimed their copy of the Pentateuch was the only original copy (a claim still made today by what few Samaritans still survive). Obviously, this was/is a claim rejected by the Jews.