When you tap on a cursed house, you will see a list of the items and their number required to unlock it, as well as the number of items you already have. Tap on the required item, and the game will automatically take you to a building in which you can get the items required to lift the curse from the house. By winning levels in the corresponding buildings, you will get the missing items.
Please note that winning a level does not guarantee that you will get exactly the item that you currently need. Items are awarded randomly for wins from a list of all items that can be found in that particular building. However, even if you do not need a particular item right now, it will still come in useful in the future!