Question about Receiving money

I will be receiving 40k (via wire transfer) and was wondering if I would need to pay taxes on it? Or is it the person who is giving me the 40k the one who will be taxed on it?  Which one is it?

 

Side Note: If it is me who has to pay the taxes on it, what's the best thing to do? If I wait until tax filing season, then I'm afraid I will be hit by a penalty because of the fact that I owe more than I usually do. Also, how will the IRS know about this 40k to know to essentially "tax" me for it? Is it because of the tax doc that my bank will provide me that essentially shows me the 'interest' that accrues as a result of this extra 40k?