Carcassonne: the Castle takes place in one of the many castles you have built during a game [of Carcassonne].
The players build their buildings, roads, etc. inside the constrained space of the castle walls and place their followers at strategic places.
Carcassonne: the Castle is a stand-alone tile-placement game with mechanics adapted for two players.
Description paraphrased from the brettboard.dk webpage.
Carcassonne: the Castle is one of the games in the broader Carcassonne series.