Goodwill is the premium paid by an acquiring company over and above the acquired company's tangible book value. On a company's balance sheet, goodwill represents the sum of all the premiums the company has paid for all of its acquisitions (although occasionally goodwill from past acquisitions whose value has fallen is written down).
Because tangible book value is equivalent to the replacement cost of a company - IE, what it would cost to buy all the company's properties, buildings, factories, and machines, hire all its workers, etc. - you might think an acquiring company would never pay more than tangible book value. After all, the acquiring company could simply build the acquisition target company from scratch for the price of its tangible book value.
However, most companies have intangible assets - such as relationships with key customers, patents and trademarks, the unique character of its employees, which are not so easily replaced. So, acquiring companies frequently pay more for a company than its tangible book value.
The acquiring company must carry the premium it pays for its acquisition targets above tangible book value as "goodwill".
Goodwill is an intangible asset arising from an acquisition, but not all intangible assets are goodwill - only those a company owns as a result of purchasing other companies. It should be noted that because Goodwill is technically an intangible asset, companies will occasionally lump the two together on the balance sheet, typically as "Goodwill and Intangibles".