Some folks use piano, paper, and pencil (still my first choice), but other composers will composer directly into music software like Logic or Finale, or even work out a piece with a performer, especially for a commission. This process usually ends with a finished score ready for the performer. Some composers are lucky enough to have an assistant who will orchestrate a work or input music notation for hours on end. Most do all the work themselves. For my current piece, Destiny: Eondwyr, I spent a couple of hours yesterday slowly improvising to a click into Logic using my Malletkat just to save time inputting literally hundreds of notes.