Marketing involves research and analysis of the target market, identifying customer needs, and developing a product or service that meets those needs; whereas advertising is a specific component of marketing that involves creating and disseminating messages or ads.
While advertising is a specific promotional activity aired at communicating a message to a target audience through various media channels, marketing is a broader set of activities designed to identify and meet the needs of customers.