Knowing the difference could make a huge difference in results.
Both are about spreading the word, but marketing is "Check out my awesome new book!" while publicity is convincing someone else to say, "Check out this awesome new book!" Today's savvy consumers don't trust marketing, but if an independent third party can vouch for your book, that's so much better. This is why publicity is (at least to this totally biased publicist) more valuable.
Marketing and publicity come together in the area of branding. Sometimes it's hard for people to see how their own image appears to other people. A good publicist will help you with the marketing of your website, stuff like: does your bio attract people? Do you have a strong Amazon profile? Is the book prominently placed on your website? Technically this is marketing, but the way I see it, I'm going to do whatever I can to help my clients---even if that means I wear more than just my "publicist" hat.
These two jobs are becoming even more conflated with the advent of social media. If a publicist helps a client with his/her Twitter feed, technically that is marketing, because it is the author selling him/herself. BUT, most of what is tweeted isn't about the author's book at all, or isn't about how to sell it. It's about building community with likeminded journalists, bloggers, publishers and readers...which is traditionally what publicists have done. That's why I believe the future of publicity will merge more and more with social media consultation.
I'd say that marketing is using publicity strategically. Publicizing a book is just promoting it wherever and whenever you can, whereas marketing would be to have some purpose and promote it in a particular way, to appeal to a particular target audience.
Having said that, I'm no expert and not sure that I'm right about that. So what's the answer to this question, Jeff - I want to learn from you.