When musicians try to write a song, it can be hard to cancel the action. Sending them somewhere else on the map works.
After a musician has started writing a song, you can find the sheet music in their inventory. You can click on that to resume song-writing. This action is easier to cancel, but still tricky. I've found that queuing up a phone call to someone always cancels the action, whereas queuing up a shower, getting a meal, or using the toilet only works sometimes.
My sim couldn't license the first song she completed, but this might not have been the first song she started. After she licensed the first song, the option to license a song was greyed out. However, I noticed that when she finished a third song, there was a jump in her royalties.
I've also noticed that there is a thin ring around the activity a sim is working on -- a song or book being written, or a picture being painted (or a meal being eaten). A green line in that ring indicated how much progress your sim has made.