There's a second, equally as important part to the fundamental first lesson of being a writer. Don't just write: FINISH WHAT YOU WRITE.
I know dozens of people who tell me they've started a project, only to give up on it a week or two later. It might be that the first rush of creativity ended, or it may be that they wrote themselves into a corner and have no idea where to take the story from there. Or maybe they just hate what they wrote and swore they'd never write again.
Finishing what you write, even if the piece turns out to be a couple of pages that dangle without context or meaning, is vital to your creative health and self-esteem. There's nothing I find more frustrating or demoralizing than seeing my computer file folders full of ill-conceived ideas and pages and pages of work that will never see the light of day.
If you have work like that, open it up and read through it. No matter how cringe-worthy it is, try to wrap up whatever it is you were trying to say. Even if it's a middle chapter of a book, try to end the scene. Put THE END? at the bottom and store all these works in a separate file. Who knows? Maybe your old work will rekindle some spark in your head and you'll actually be able to finish your work.
As to how to actually motivate or work out how to finish your work...well, that's a lesson for another day.
1. Do as above. Go through all your unfinished pieces and force yourself to read through them and finish them. Store in a separate file so that you still have them, but will never have to look at them again. Don't try to get fancy, unless creativity strikes: if you just have no idea what to do, try "And then a meteor struck and everyone died. The End?"
Note: Do NOT delete these pieces! Save them somewhere--one day you'll be able to look back and laugh at yourself. Seriously.