By law, all offers and sales of securities within the United States must be either:
registered with the Securities and Exchange Commission (the SEC); or
issued relying on an available exemption from such registration.
Generally speaking, "public" type offerings (for example an IPO) must be registered (such as any stocks publicly trading on the Dow Jones or NASDAQ) - this is a long and complex process.
When startups raise capital through private markets, i.e. raising from venture capital funds, the offerings are private by definition ("unregistered"). Therefore, they rely on an exemption from registration.
As startups almost universally (when fundraising from venture capital funds) issue unregistered securities, there are no specific legal considerations or potential risks to take into account other than the risks associated with investing into startups in general.
Startups typically work with counsel to issue securities, who usually shoulder the burden of ensuring compliance for exemptions from registration.
*Please consult experienced local counsel if you have questions pertaining to securities issued in other jurisdictions.