No, you are not required to invest only in penny stocks - investors are generally not restricted to a certain kind of stock based on the amount of money they have. That is, a $500 investment is a $500 investment no matter how many shares you purchase or how high the share price. For example, if you invest in a company that is trading at $0.10, you can buy 5,000 shares, but you can also invest in a company trading at $100 and buy only five shares. Although there are fewer shares in the second case, the total value of the investment is the same.
But, regardless of how much money you have available to invest, it is very important to understand that penny stocks are generally of highest-risk stocks in the market. They may seem attractive since a rise from $0.10 to $0.15 represents a 50% increase, but penny stocks have also a high chance of generating large losses. As such, especially if you are a new investor, you might instead want to consider, for instance, blue-chip companies - such as General Electric or Microsoft - which tend to have long-established track records of operations and trade on exchanges that are closely regulated by the SEC. These characteristics are not found where penny stocks are traded - in the over-the-counter markets. That said, however, remember investing in stocks involves some level of risk, even if you invest in big players.
If you want to invest in stocks with relatively little money, it is especially important that you take into account trading commissions and the minimum-deposit requirements imposed by some brokerage accounts. (Before investing in the stock market, you might find that it is better to put the $500 into something with less fees and restrictions, such as a savings account, until you can save up more to invest in stocks.) Consider using an online discount broker, which tends to have the lowest fees (under $10 per trade).
But even though you use a discount broker, remember commission fees act as negative returns, so do try to minimize them as much as possible. For example, if the commission is $10 per trade, after making one trade with your $500, you have only $490 to invest - in other words, you have already lost 2% on your investment. This means that to break even, your stock will need to go up by roughly 2%. (Some full-service brokerage firms charge $250 per trade, which would represent a 50% loss, so you would need a 100% gain to break even.)
Because you are dealing with such a small amount of money, consider limiting the number of different stocks you buy to minimize the commission. If you were to split your $500 into five stocks and the commission is $10 per trade, you would be faced with $50 in fees instead of $10 or $20 if you bought only one or two different stocks.