There are plenty of well-known investors who are famous for their overwhelming success, but few have the track record Peter Lynch can boast of. In 1977, Lynch was put in charge of Fidelity's Magellan Fund, which had $18 million in assets at the time. By 1990, when Lynch resigned, it had grown to over $14 billion.

Whether you're starting to invest for the first time or have been at it for years, it pays to take a lesson from someone who's consistently beaten the market. With that in mind, here are a few inspirational quotes from Peter Lynch -- and what we can all learn from them.

Laptop with graphs on it next to document with bar graph and calculator

Image source: Getty Images.

1. "You only need a few good stocks in your lifetime."

While having a diversified portfolio is important, the reality is that you don't need every stock in your portfolio to be a winner. In fact, if you put thought into choosing stocks, you may find that just a handful are able to carry the rest so you come away with favorable returns over time.

2. "When stocks are attractive, you buy them."

A lot of investors tend to overthink things when stock values start to come down. Buying at a low is a good strategy to employ, but where some people go wrong is chasing the lowest price rather than simply an attractive price. When it comes to growing wealth, it's not about whether stocks will fall further; it's whether their value will increase from the price you buy them at.

3. "The real key to making money in stocks is not to get scared out of them."

Many people let a fear of losing money keep them out of the stock market completely. But if you let that fear win, you face an even greater risk: Not growing enough wealth to meet your financial goals, like retiring comfortably, buying a home, or anything else you might have on your list. Along these lines, you also shouldn't let your fears drive you to make rash choices you wind up regretting. When stock prices drop, many people react impulsively and start liquidating their investments left and right -- and that's a good way to lose money. A better bet is to remind yourself that stock market volatility is normal, and that sitting tight and taking a long-term approach to investing can help you avoid losses and come out a winner.

4. "A stock market decline is as routine as a January blizzard in Colorado. If you're prepared, it can't hurt you."

Recessions and market corrections are a natural part of our economic cycle, so if you're going to buy stocks, know that at some point in time, your portfolio is apt to take a hit. That hit can remain temporary, however, if you prepare by having enough cash on hand to cover near-term expenses so you're not forced to liquidate investments at a loss. Remember, you only lose money in stocks when you sell them for less than what you paid for them. If you do nothing and wait out market declines, you won't actually lock in losses at all.

Investing in stocks can be a roller coaster ride, but it's a ride well worth taking. Keep these important lessons in mind as you attempt to build a solid portfolio that serves you well in the long run.