It was a city, specifically the capital of the rebel territory after Israel split in two. But in time “Samaria” was the name of that entire region – not just the city. This started when the Assyrian Empire took over the region and continued through Jesus’ day.