Are you talking about Luke 4? They were excited to hear Jesus claim that Isaiah 61 was fulfilled, for this meant the restoration of the Kingdom was finally here.
But there joy quickly turned to anger when they found out that the Gentiles were to be included in this restoration (when Jesus speaks of Elijah and Elisha, he shows how the prophets performed miracles for the Gentiles when there were Israelites in need.
Why? Because they were expecting the restoration of Israel would create a mighty kingdom that would subdue the Gentiles. The Jews in Nazareth were not expecting the Restoration of Israel to mean that they would be come a Light to the Gentiles.