What is the difference between advertising and marketing?

I've noticed that some people say they're in advertising but not marketing, or vice versa, and I wanted to understand the difference between the two since I always assumed they were somewhat interchangeable.