A successful company understands the need to reinvent itself every now and then to keep up with competition, changes in the market, technology and customer interest. Not doing so could mean a drop in stock prices, a decrease in revenue or worse — bankruptcy or even death. Just take a look at some of the brands that used to be on top but have taken a beating over the years (does the name "Blockbuster" sound familiar?).

Fortunately, many of the prosperous and best brands you've grown to love have undergone transformations to reinvent themselves and secure your loyalty. Here's a look at a handful of companies that maintained longevity and their bottom line by rebranding or reinventing themselves.

1. Netflix

Today's younger generation probably doesn't remember that in the late '90s to the early 2000s, "Netflix and chill" wasn't as easy as firing up the laptop, logging into a Netflix account and picking a movie or TV show to binge watch. Instead, Netflix was kind of like an online Blockbuster, more or less.

In 1998, Netflix launched the first DVD rental and sales site with Netflix.com. One year later, the company debuted its subscription service, which allowed movie buffs to rent unlimited DVD rentals for a low monthly cost and receive them by mail.

It wasn't until 2007 that Netflix transitioned into online streaming — and it was a smart move. Finally, viewers of all ages would have access to some of their favorite shows and movies, as well as original Netflix content. In fact, in 2013, Netflix nabbed 31 primetime Emmy nominations for its original shows like "House of Cards" and "Orange Is the New Black."

Although the company has received some angry outcries from customers over the years because of changes in pricing, the company has experienced financial success over the long term. For example, Netflix stock was trading at $3.80 at the beginning of 2007. On Sept. 1, 2016, the stock closed at $97.38.

These days, it's safe to say Netflix is considered one of the coolest stocks to invest in. And although the company didn't grow its subscriber base as much as it wanted to in second-quarter 2016, Netflix did grow its members by 1.7 million.

2. IBM

Sure, some might argue that investing in IBM would be a mistake because its revenue has fallen in previous quarters, reported NASDAQ in July. However, NASDAQ also reports the company is "amid a transformation process" and might actually be a good buy. And if there's only one thing you'll learn about IBM's history, it's that this company knows a thing or two about reinventing itself and keeping pace with ever-evolving technology.

Since debuting as the Computing – Tabulating – Recording Company more than 100 years ago, IBM has undergone major transformations. Back then, C-T-R would manufacture and sell various machinery such as commercial scales, industrial time recorders, meat and cheese slicers, and more. And, it wasn't until 1924 that C-T-R became the International Business Machines Corporation, although it has operated under the name since 1917 in Canada.

Fast-forward a few decades to the '50s and '60s after Thomas J. Watson Jr. became CEO and "led IBM's transformation from a medium-sized maker of tabulating equipment and typewriters into a computer industry leader," according to IBM's website. In 1964, the company created System/360, which essentially made it possible for machines in a product line to work with each other, making a huge impact in the business world. Less than 20 years later, in 1981, the IBM Personal Computer (IBM 5150) arrived. Although it wasn't the first-ever PC, people began buying these computers to use in their daily lives.

However, the '80s and early '90s were rough for the company. According to its website, "IBM was thrown into turmoil by back-to-back revolutions." The company didn't properly prepare for the PC revolution, reported NPR in 2011. With the focus on "desktop and personal productivity" instead of business applications, IBM suffered annual net losses that reached the billions — a record of $8 billion in 1993.

The company had two options: reinvent or die. So, IBM shifted its focus to IT and consulting, according to NPR.

Still, the company has plans to further reinvent itself. In her 2015 chairman's letter, CEO Ginni Rometty wrote, "Today, IBM is much more than a 'hardware, software, services'  company. IBM is now emerging as a cognitive solutions and cloud platform company." Thanks to its transformation, IBM reported its analytics, cloud, mobile, social and security strategic imperative grew by 26 percent and contributed $29 billion in revenue in 2015.

3. Amazon

More than 20 years ago, Amazon was a much different company. It's hard to believe this go-to online retailer that sells everything you could possibly think of — from TVs and computers to groceries and household items — started off as an online book retailer.

In 1995, CEO Jeff Bezos sold his first book on Amazon.com, which itself has changed drastically since the mid-90s. Back then, the website contained a lot of blue, hyperlinked text — quite different from the colorful photos and organized categories you'll see on the site today. But Amazon's design was practical; the company's main mission was to sell books, after all.

Author Brad Stone — who wrote the book "The Everything Store" about Amazon and Bezos — told NPR in 2013 he thinks Bezos started off selling books because it was "a good place to start: [Books are] small, they ship easily in the mail, the selection that the internet enables was a great strategic advantage over the traditional chain booksellers of the time like Barnes & Noble and Borders."

Indeed, buying books on Amazon was — and still is — easy and even preferable to going to a physical bookstore for many people. Although Amazon experienced success with its book-selling strategy, Bezos reinvented Amazon to sell more than just books.

In 1996, the retailer introduced an affiliate program — known as the Amazon Associates Program — which helped the company expand its reach, reports CBS News. And after announcing its IPO in 1997, Amazon introduced "one-click shopping" and began offering different products and services in various categories: music, DVD/video, home improvement, software, video games, gift ideas, kitchen, and so on.

These days, the company is making big money. According to its second-quarter financial results report, net sales hit $30.4 billion — a 31 percent increase compared to second-quarter 2015. Forbes also named Amazon as one of the world's most innovative companies of 2016.

4. Old Spice

Old Spice is no longer associated with "old" or "colonial" men, thanks to successful rebranding attempts. The product — which debuted in 1937 as Early American Old Spice for women and then in 1938 as Old Spice for men — is now a popular men's grooming brand. But it wasn't always that way.

After experiencing decades of success, Old Spice began to lose sales as competition increased and because it suffered from "an outdated brand image," found a 2014 case study by the University of Southern California. In June 1990, Procter & Gamble — which owns tons of brands, from Pampers to Gillette — bought Old Spice from the Shulton Company. P&G attempted to rebrand the product, but it wasn't until Old Spice launched its "Swagger" Campaign in 2008 that it started attracting the younger demographic it needed to compete with other brands, such as Axe, according to the study. Old Spice's real moment of reinvention, however, came two years later.

In 2010, former NFL player Isaiah Mustafa starred in Old Spice's "The Man Your Man Could Smell Like" campaign. You might remember it: Standing in front of a running shower with nothing but a towel on, Mustafa tells female viewers, "Hello, ladies. Look at your man, now back to me. Now back at your man, now back to me. Sadly, he isn't me," and suggests that if their men switch to Old Spice, they could smell like him.

When the ad debuted on YouTube during Super Bowl weekend, it became a viral hit. It was simply funny. According to an undated P&G fact sheet that addresses the initial campaign and its sequel "Smell Like a Man, Man," Old Spice received a 2,700 percent increase in Twitter followers, an 800 percent increase in Facebook fan interaction, a 300 percent increase to the Old Spice website and around 105 million YouTube views.

The campaign made an impact on sales as well, though the fact sheet didn't provide any exact figures. AdWeek, however, reported in July 2010 that overall sales for Old Spice body wash products jumped 107 percent in the last month after two new TV spots and online response videos debuted.

5. McDonald’s

In 2001, the book "Fast Food Nation: The Dark Side of the All-American Meal" released — and it didn't have that many nice things to say about fast food giant McDonald's.

In a New York Times book review, Rob Walker wrote, "The aim of his book … is to force [the author's] readers to stop and consider the consequences of McDonald's and its ilk having become inescapable features of the American (and, increasingly, global) landscape — to contemplate 'the dark side of the all-American meal."'

Although it's hard to tell if the book's release directly — or indirectly — hurt McDonald's reputation and brand in a monetary way, the Wall Street Journal did report in 2003 the restaurant posted its first quarterly loss in 38 years as a publicly traded company. However, the WSJ article said the closing of hundreds of restaurants, restructuring costs and other factors attributed to the huge loss. Nonetheless, McDonald's food offerings have changed over the years to accommodate the healthy eater.

McDonald's currently offers plenty of healthy options, including salads, low-fat and fat-free milk, fruit and more. Plus, the fast food joint continues to make its nutritional facts available for everyone. No longer is McDonald's only seen as the go-to place to grab a Big Mac loaded with 500-plus calories; its image is more health-conscious.

In addition, McDonald's has taken steps to reinvent the fast food world by offering "All Day Breakfast" and its McPick 2 menu.

According to its second-quarter 2016 results, McDonald's experienced its "fourth-consecutive quarter of positive comparable sales across all business segments." And according to Forbes, the fast food giant has a market value of more than $100 billion.

6. Lego

Lego has been around since 1932 and for years has been a hallmark toy in many children's lives. At one point in 2014, Lego even became the top toy company in the world, surpassing Mattel's Barbie doll, reported the Wall Street Journal at the time. But the Danish toy company wasn't always a star performer.

According to a 2015 Fast Company article titled "How Lego Became the Apple of Toys," the company was reportedly on the brink of bankruptcy more than 10 years ago. The growth of video games and the internet threatened the toy company, which might've been considered as "old-fashioned" in the face of new, innovative toys and games, reports Fast Company. In reaction, Lego reportedly made a few mistakes. However, by cutting costs, improving processes and managing cash flow, the company was on its way to bouncing back.

In 2011 came a Lego line called Lego Friends, which helps the brand appeal to young girls and combat the stereotype that only boys can play with the building blocks. But jump ahead to 2014, when "The Lego Movie" hit theaters. The movie and its products really helped Lego get the revenue boost it needed to overshadow Mattel in 2014, according to WSJ. Thanks to innovative products and a successful movie, Lego is now more than just a toy — it's a cool franchise.

According to BoxOfficeMojo, "The Lego Movie" film has grossed more than $460 million worldwide. And according to the company's 2015 annual report, as reported by Bloomberg, net income reached 9.2 billion Danish kroner in 2015 — the equivalent of $1.34 billion and an increase of about 31 percent.

7. Apple

It's hard to imagine that in late the '90s, Apple was on the verge of bankruptcy — but it was, reports Business Insider. Fortunately for the company, one of Apple's biggest competitors — Microsoft — put on the Superman cape and rescued Apple from its collapse by forking over millions of dollars in 1997.

According to Bloomberg, Microsoft's $150 million investment helped Apple get the money it needed to change the technology space. In fact, it might be fair to say that thanks to Microsoft, Apple is now one of the world's most valuable and innovative brands. After all, Forbes puts Apple's brand value at $154.1 billion. In comparison, Apple was worth less than $3 billion when Microsoft invested in the company, reports Bloomberg.

But give Apple some credit for its success; the company reinvented itself as more than just a Mac maker. Its handheld devices — from iPods to iPhones to iPads — have brought the company to an entirely new level. Apple's ability to reinvent itself, and truly the product place, can easily explain why it's consistently considered one of today's best brands. Apple loyalists are always wondering, "What's next?" Perhaps that's why investors, including the famous Warren Buffett, continue to invest in this hot brand.

Sydney Champion contributed to the reporting for this article.

---

This article originally appeared on GOBankingRates.com:

GOBankingRates.com is a leading portal for personal finance news and features, offering visitors the latest information on everything from interest rates to strategies on saving money, managing a budget and getting out of debt.