With more than 30 million monthly active riders, Lyft (LYFT 6.09%) is quickly building itself into a ride-sharing behemoth. While Uber dominates this market, Lyft is fighting a ferocious battle in North America and already commands 39% of the ride-sharing market in the U.S.

Investors have likely heard a lot about Lyft over the past few weeks, considering it went public just last month. And with all of the attention this ride-hailing giant is getting, it's worth asking the question: How does Lyft actually make money?

To satisfy your curiosity, here's a video from our YouTube channel. (A full transcript follows the video.)

Narrator: Ride-sharing services allow users to hail a car on command, simply by tapping a few buttons on an app.

And Americans have fallen in love with these apps. Tens of millions of people use a ride-sharing services every year, creating an estimated $36 billion market.

In the U.S. there are only two major players in the ride-hailing market: Uber and Lyft.

And while Uber dominates, Lyft has carved out a very significant 39% of the U.S. market.

In this video, we're going to break down exactly how Lyft makes its money by turning tens millions of riders into billions of dollars in revenue.

Lyft's business is built on independent contractors that drive for the company, and it has to pay them -- along with other expenses -- to operate its business across the U.S. and in Canada.

And that's where Lyft's rider fees come into play.

The company charges riders a fee for using its services, based on the length of the their ride, time of day, and other factors.

Lyft's bookings -- which is amount the company collects from riders before it has to pay its drivers, and other fees -- totaled $8.1 billion in 2018.

And Lyft generated $2.2 billion in sales in 2018 -- more than double what it was the year before.

But despite its impressive bookings and fast-growing sales, Lyft actually lost $911 million in 2018. So where did all of that money go?

Lyft's biggest expense is the company's broad "cost of revenue" category, which includes everything from insurance costs to payment processing fees, to web hosting and other technology expenses.

In 2018, the company's cost of revenue was $1.2 billion.

Additionally, Lyft has other expenses for sales and marketing, research and development, and administrative costs.

When all of its expenses are totaled up, Lyft spent $3.1 billion in 2018.

But while Lyft isn't profitable right now, there are significant signs of growth. For starters, Lyft has 30 million monthly active riders, which is up 226% from 2016. And those riders are worth a lot more to the company than they used to be.

At the end of 2017, Lyft's average revenue per active rider was $27.34, but that figure jumped to $36.04 at the end of 2018.

Lyft is still in growth mode right now and it's fighting hard against its largest ride-sharing rival, Uber.

This ride-sharing battle likely means that Lyft will continue to spend lots of money on its business -- at the expense of growing its bottom line.

But the company has long-term plans to cut costs. Such as using driverless cars to drive passengers around.

The company is partnering with some self-driving tech companies -- such as Aptiv (NYSE: APTV) -- to test autonomous vehicles.

Lyft and Aptiv are using self-driving cars in Las Vegas and have already completed 30,000 self-driving rides to users.

Using self-driving technology could help reduce some of Lyft's driver expenses, though the company says human drivers will always be a part of its business.

For now, Lyft is focused on generating more revenue from its riders, through new services like scooter rentals and by boosting the amount of rides a user takes each month.

So rider fees -- its how Lyft actually makes money.