It's kind of hard to explain, especially for a slow 2 fingered typist like myself.
First, goodwill only comes into existance when a company is purchased. You can't just throw it on your balance sheet.
Say I have company with a $100 desk (book and FMV) I bought with $100 of equity. And I have a great idea and lots of people lined up to buy that idea. You decide to buy 100% of my company for $5000. That extra $4900 that you are willing to pay is what gives rise to goodwill. At the end of the day, you are taking cash and buying a present value of some excess returns that you expect to be able to generate from my company vs what you could expect to earn from the exact same underlying acquired balance sheet of another similar company (Note: This is meant as a layman's explanation of what goodwill is, not a technical definition)
On your (preconsolidation) balance sheet you now have a line item:
Investment in SuperIco $5000
The inital offset to the investment entry that you recorded may have been any combination of cash, debt, equity, etc. It's whatever was used to fund the acquisition (irrespective of whether or not the transaction gave rise to goodwill.)
In order to consolidate my operations onto your balance sheet you will record the following entry
PPE 100 (to consolidate the desk)
Goodwill 4900 (to reflect the goodwill you bought)
Investment in SuperIco 5000 (to eliminate the investment)
The elimination entry records all specifically identifiable assets and liabilties acquired at their fair market value at date of acquisition, with any excess amount paid typically attributed to Goodwill.
In terms of impairment, its easiest to start with the pre-2001 rules. Back then you treated goodwill pretty much like a depreciable asset, writing it down in equal pieces over 40 years thru your income statement. Now Goodwill is no longer amortized annually. Instead you test to see if the amount has been impaired, and only then do you adjust the amount downward. Impairment also flows thru the income statement, except that the amount is not a scheduled, even, annual amount. Instead it's an unpredictable "chunky" amount that you record as an expense on an as needed basis when there is evidence that the value has declined.
Hope this helps.