Branding is a process of uncovering a company's or individual's big "why" (values, mission, purpose, impact), followed by the expression of that "why" in the visual representation (name, logo, colors, fonts, etc.). Branding shows potential clients why the company is unique and makes them want to buy the service, and stay loyal to it.
Advertising is a paid promotion, the goal of which is to attract and persuade an ideal customer to buy the product or service, thus boosting sales. It's usually done through different media types (TV, Internet, radio, magazines, etc.).
The purpose of advertising is to tell prospective clients about the benefits of the product.
The purpose of branding is to create interaction between clients and the creator of the product or service based on the values that are transmitted through the brand. This creates loyalty towards the product. It's about making people feel and think a certain way about you and what you offer.