Goodwill is an intangible non-current asset. Any purchase or sale of non-current assets (tangible or intangible) is classified under investing activities. Therefore, purchase of goodwill results in a cash outflow shown under investing activities in the Cash Flow Statement.