Knowledge is the key. The more you know, the more you have as a basis for innovation.
This is gold^
As for how to actually do it, everyone goes about things different ways. Whenever I make something (both for magic and outside of magic), I follow this general format (Specifically for physical gimmicks and tools here, not just a routine or a trick):
Step 1: Have the idea and write it down
Step 2: Figure out what the actual end goal is.
Step 3: Figure out a few of the ways you can go about doing it.
Step 4: Draw the actual design of it out
Step 5: Pick the most reasonable and begin prototyping with random materials.
Step 6: If it didn't work, pick a new idea and begin prototyping, but if it did work, figure out everything that you can cut from it that isn't needed
Step 7: Using this revised model as a guide, create an early version.
Step 8: Add onto it anything that you think will make it better, but is still reasonable.
Step 9: Experiment with it and keep developing it.
Step 10: Build a renewed better version
As for coming up with ideas, just write down the end effect that you think of, and keep thinking of it, and ways to achieve it. Find things in life that work similarly to it, and use those as a model.