Goodwill is created when a buyer acquires a company for more than "fair market value." It is calculated by subtracting the book value of the seller from its equity purchase price.
In other words, Goodwill and other intangible assets represent the valuable things that do not show up on a company's balance sheet such as the company's brand recognition, intellectual property, customer relationships, copyrights, etc.