If you're looking to learn how to write independent lines that compliment an existing lead, there's an entire compositional art dedicated to just that called "Counterpoint". You can read "Fux Gradus Ad Parnassum" for a fairly complete presentation on how to do counterpoint, but for the short-short version:
Four types of motion (aka two notes moving at the same time) are used to create independence between lines, from "most" independent to "least":
Counter Motion (notes move in opposite direction)
Oblique Motion (one note moves while the other stands still)
Similar Motion (notes move in the same direction but by different amounts)
Parallel Motion (notes move in the same direction and by the same amount)
All of this motion can (and should) be used, but be careful when moving in parallel motion to not move in parallel unison (the notes will sound like the same note, losing the independence), parallel octaves (same issue as moving in unison - you lose the voice), and parallel fifths (fifths discourage motion in music, moving in parallel makes the lines sound disjointed). Furthermore, do not move in similar motion into an octave, unison, or fifth. Oblique motion shouldn't lead into a dissonance, but it can lead out of one. Overall chord intervals shouldn't be dissonant, so don't lead into dissonance between your two notes, but decorative notes (like passing or neighbor tones) can be dissonant without too much issue.
Aside from that, go nuts, the world is your oyster and all that jazz. This is a primer on traditional counterpoint, which kinda ignores some modern music (dissonance is generally more accepted nowadays, for example), but it should act as a nice guideline if you're having trouble making independent lines in your music in the first place.
This has been a crash course on basic voice leading and counterpoint from yours truly. Hope it helps.