Sounds hard? Well, it would be, but it isn't.
Nightmare mode is unlocked about halfway into the main story, it's the big skull on your map. In it, you have to beat every invasion level apart from the Candy Land ones without dying. Die, and you go back to the first one. 36 levels in total. This would be horribly difficult if it wasn't for the fact that you can cheese the everliving hell out of it. Simply pause the game and close the game app if you're about to die. When you load it up again, you can go back to Nightmare and you'll get to start from the level you were on. As long as you don't let yourself actually die, you can do this as many times as you need. Just be careful on levels with instakill obstacles (such as the red birds that chase you) or bottomless pits. And that's all there is to it. If you find any level tricky, you can always buy a gadget thing. I recommend the path thing, the heart thing and the checkpoint thing.