For an affiliate, the same applies as for any other type of business:
If the intention is to make a profit from the activity one wants to pursue, one must register a business.
If a person intends to earn money as an affiliate, this represents a classic intention to make a profit and, as a rule, he or she must register a trade with the Trade Licensing Office.
Many affiliate program operators, who are also responsible for paying out affiliates, ask for some tax information when you open an account, including your tax number. You get the tax number when you register an activity as a trade with the tax office.
There are of course some tricks how you can earn money as an affiliate even without a trade for the time being. For example, you can register as an affiliate with some foreign providers and they let anyone join, they don't even check how old the affiliate is.
In the above examples, the payouts are mostly done by PayPal or by check. You can say that this is a gray area that still works in many industries today.
If you reside in USA and work as an affiliate with national affiliate programs, it is mandatory to have a trade license. If you want to try your hand as an affiliate without dealing with the tax part first, you can start with foreign providers and see if affiliate is the right job.
In any case, sooner or later you will have to register a business or choose the option with one of the many tax havens in order to permanently generate high income as an affiliate.