The first thing would be to note that ni + vowel and ñ do not sound that different (which is the point of your question, obviously), so in many cases you won't need to imitate it perfectly. That is, nieto and *ñeto (the latter word does not exist) would be very difficult to distinguish in practice even for native speakers, unless pronounced slowly. In a word with n next to ñ such as niñito, however, the contrast becomes readily apparent.
What you need to understand is how n and ñ are produced.
Spanish n (IPA: /n/) is alveolar (when followed by a vowel), as in English. The tip of the tongue must be placed flat against the alveoli, which are the spaces just behind the roots of your upper front teeth.
Spanish ñ (IPA: /ɲ/) is palatal: the middle of the tongue must be raised and pressed against the hard palate, while the tip will be probably lowered and pressed against the back of your lower teeth.
There are a ton of resources on the web for this, but check out this one, which has drawings.
You might want to use niñito as a test. If you pronounce it OK, you will notice how the tongue shifts in your mouth, the tip first striking your alveoli and then coming down to touch your lower teeth. If instead you're pronouncing *ninito, your tongue will tap your alveoli twice in succession.
ADDED: This applies also to the difference between ll and li, but as explained in this answer about the pronunciation of ll, in most Spanish dialects ll has merged with y and the merged phoneme is pronounced generally rather differently and it's not as prone to confusion with li.