In the United States, there are minimum ages for many things. The minimum age to purchase alcohol is 21, tobacco 18. Joining the military can't be done until age 18, except in special circumstances. However, there is no minimum age to invest in stocks.
While investing sounds like it might be something that requires a minimum age, there actually is no minimum age to invest in stocks. One can own stocks at age age via a gift or inheritance. One can theoretically purchase a stock at any age, although most methods for purchasing stock will require a co-signer if the buyer is a minor.
Although there is no legal minimum age to invest in stocks, purchasing stock will be difficult without an adult co-signer of some sort. A brokerage account can be opened in the name of a minor, but the account application must be signed by an adult over the age of 18. Likewise, a direct investment account, such as a DRIP program, will also require an adult signature to open. So, while there is no legal age to invest in stocks, an adult signature will almost always be necessary.
An adult signature is necessary because although there is no minimum age to invest in stock, there is a minimum legal age for entering into a binding contract. In most cases, this is age 18. So someone under the age of 18 cannot legally be bound to the terms of the account agreement, whether for a brokerage account or other investment account.
Although an adult signature will be required to open any sort of investment account, a person under the age of 18 can own stocks without having an account. In order to do so, someone else will need to purchase the stocks and then have them delivered in "certificate form," which means that the owner has paper shares instead of shares held in an account. Then the owner can gift, or leave in their estate, the shares to anyone they choose including someone under the age of 18.
Because a person of any age may invest in stocks, it may be the case that a very young person is the owner of a company's shares. This person gets all the benefits of stock ownership, including the right to vote for directors and receive dividends. Thus, a person of any age can be responsible for taxes on the earnings as well as the duty to vote for company issues.