Ghost writing is when someone takes content and creates a literary work for you (while you take the credit for writing it), while rewriting is is simply rewording content. You could have someone ghostwrite rewritten content for you.
Ghostwriting is where someone writes and you put your name on it. While re-writing is exactly what it says. Content that is re-worded to say the same thing using different words and phrases. I personally perfer 100% original content, even though re-writing is a very beneficial practice also. I do write spinnable articles, but do not personally practice article spinning.
Summarizing both of the above correct definitions I would add, ghostwriting always returns you original content, while rewriting returns rewording with a few original changes to make it different from the original.
Ghostwriting - Your name isn't on it / you're not the person credited as the author (it doesn't have to be literary -- most business writing is done this way too) Rewriting - Unoriginal derivative work, and copyright infringement unless the owner of the original work grants permission for a rewrite.
Ghost writing is when someone does a literary work for you and you take all the credit while re-writing is when you take a given work such as a private label rights product or article and rework it to make it unique