During lunchtime at middle schools across the U.S., adolescents stare at 15- to 60-second clips of their friends lip-synching to Beyoncé on the video-sharing app TikTok. At home, it’s more of the same: Tap on TikTok, scroll through a feed of clips featuring shimmies to Shakira or skateboard stunts, and then pick one to watch.
Even in the annals of viral apps, TikTok is a standout. Since debuting two years ago, it has been downloaded 950 million times—mostly by teens seeking snippets of entertainment or looking to share their own rapping, dancing, or magic skills with the world.
TikTok is so popular in fact that, by one measure, it ranks among a who’s who of tech. During the first three months of this year, it was the third most downloaded app worldwide, ahead of Facebook and Instagram, and just behind WhatsApp and Facebook Messenger, according to app analytics firm Sensor Tower.
“TikTok’s all about these scrappy viral videos shot with no budget and low production,” says Randy Nelson, head of mobile insights at Sensor Tower. “Unlike on Instagram or YouTube, which are far beyond their maturation point, TikTok’s a Wild West.”
Still, with the growth, TikTok is quickly morphing from its roots in amateurish lip-synching clips to a destination for more elaborate videos cut with increasingly sophisticated editing tools. Reenactments of movie comedy scenes and cooking tutorials are just some of what’s popular on the app.
But video apps are a particularly fickle business, as users inevitably flock to the next big thing. They’re also notoriously difficult to make money from—so much so that few, if any, have ever turned a profit.
Twitter, for example, learned the hard way, after jumping on the video bandwagon in 2012 by paying $30 million for Vine, a then-hot app that let users shoot and share six-second clips. For a short period of time, Vine flourished. But the fad quickly passed, prompting Twitter to shutter the service in 2016.
TikTok, which declined to comment for this article, is owned by ByteDance, a Chinese tech conglomerate founded in 2012 by former Microsoft engineer Zhang Yiming. The company’s first product provided users with a personalized list of news headlines. After a few more forays into news and entertainment, Zhang introduced Douyin, a video-sharing app for the Chinese market, in 2016. A year later, ByteDance created an equivalent video app for overseas users under the brand name TikTok.
It was hardly an overnight success. But then ByteDance paid nearly $1 billion for Chinese-owned Musical.ly, which had gained impressive traction among U.S. teens who used it to share short videos of themselves lip-synching. Zhang soon folded it into TikTok, which then started to take off.
Facebook is clearly paying attention. Last year, it introduced its own rival video-sharing app, Lasso. But the wannabe-TikTok has been downloaded just 187,000 times as of June, according to Sensor Tower. Meanwhile, Facebook-owned Instagram is also adding TikTok-like features. Last year, for instance, Instagram incorporated music into Stories, its ephemeral feed of photos and videos, while in May it started letting users append song lyrics to their videos so viewers could sing along.
But none of that has slowed TikTok’s rapid growth. In the first quarter, on Android phones alone, U.S. users spent 85 million hours in the app, nearly five times as many hours as were spent during the same period last year, according to analytics firm App Annie.
“ByteDance has hundreds of engineers in A.I. alone and is known for its algorithms, which are just really good at figuring out what you like and sharing with you other stuff it thinks you’ll like,” says Hans Tung, a managing partner at investment firm GGV Capital who was an early backer and board member of Musical.ly.
TikTok’s rise has come with controversy. Twice this year, it ran afoul of regulators over its young users. In February, ByteDance paid $5.7 million to settle allegations by the U.S. Federal Trade Commission that Musical.ly, before merging into TikTok, had illegally collected data about minors. Following the settlement, TikTok started purging users under 13, the minimum age for using the app in the U.S.
“It’s our priority to create a safe and welcoming experience for all of our users,” TikTok said in a statement at the time.
Then, in April, India’s high court banned TikTok over concerns that it had helped spread pornography and put minors at risk. Judges lifted the ban two weeks later, after TikTok assured the court it would address the issues.
ByteDance, which is privately owned, doesn’t disclose financial details about TikTok. But because its business is still a work in progress, TikTok is almost certainly a money loser.
Like many other apps, TikTok sells ads. But it’s also increasingly experimenting with other ways to generate revenue.
Companies can pay TikTok to run sponsored “hashtag challenges,” in which users are encouraged to share videos using a hashtag affiliated with the advertiser. Guess Jeans was the first U.S. company to give it a try. The label asked users to shoot “rags to riches” videos showing people instantly changing—with the help of TikTok’s editing tools—from scruffy sweats into dapper denim, and then to share the clips with an “InMyDenim” hashtag.
To date, videos with “#InMyDenim” have been viewed 37.7 million times.
Nevertheless, TikTok still has a lot of work to do if it wants to compete against the social media giants for ad dollars. Excluding China, TikTok has only 150 million monthly active users worldwide, according to App Annie, indicating that many people who have downloaded TikTok’s app don’t use it. Facebook, in contrast, has 2.4 billion monthly users across its family of apps, which includes Instagram and WhatsApp. And right now, TikTok has very limited advertising abilities, says John Lincoln, CEO of digital marketing firm Ignite Visibility.
Unlike Facebook, TikTok can’t target ads to particular users based on their interests. TikTok’s users simply don’t share as much personal information about themselves.
Increasingly, marketers are bypassing TikTok’s sales team to cut deals directly with TikTok influencers. These social media tastemakers earn money by using the brand’s products or sharing a particular hashtag—but TikTok doesn’t share in the revenue.
Austin Sprinz, a 23-year-old from Tempe, Ariz., who has over 2.4 million followers on TikTok, says he and his brother have been approached for such deals. He declines to say how much money they’ve earned, but posting TikTok videos is their full-time job.
“We pretty much do it every day, from when we wake up to when we go to bed,” says Sprinz.
In the end, their success depends on millions of flighty teens. And so does TikTok’s.
A version of this article appears in the July 2019 issue of Fortune with the headline “TikTok Is on a Tear.”
More must-read stories from Fortune:
—The fall and rise of VR: The struggle to make virtual reality get real
—“It’s just lazy”: Current’s CEO on Facebook Calibra’s similar logo
—Slack went public without an IPO. Here’s how a direct offering works
—Welcome to the next generation of corporate phishing scams
—Listen to our new audio briefing, Fortune 500 Daily
Catch up with Data Sheet, Fortune‘s daily digest on the business of tech.