An investor allocates capital with the expectation of a future financial return. Types of investments include: equity, debt securities, real estate, currency, commodity, token, derivatives such as put and call options, futures, forwards, etc. This definition makes no distinction between those in the primary and secondary markets.
That is, someone who provides a business with capital and someone who buys a stock are both investors. An investor who owns a stock is a shareholder.