In MuseScore, use the voices tool (the same is true for Finale and NoteFlight, though the specific process is a little different):
Typesetting a keyboard-style voice-leading exercise in MuseScore from Kris Shaffer on Vimeo.
In Lilypond, use the keyboard-style voice-leading template:
Typesetting a keyboard-style voice-leading exercise in Lilypond from Kris Shaffer on Vimeo.