Hinterlands is an expansion for Dominion built around the theme of cards that do something when they are bought or gained.

Hinterlands, the 7th game, is an expansion introducing 26 new kingdom cards. The unifying theme is cards that do something when bought or gained, such as Ill-Gotten Gains, a treasure that gives all other players a Curse when you gain it.

The Dominion rules are extraordinarily comprehensive. For questions regarding how cards interact, if you can, check the individual card entries in the appropriate rulebook(s) and you'll probably find your answer there. A PDF of the Dominion: Hinterlands rules is available here.