Can someone explain how serverless scaling actually works?

I’ve read the FAQs and several whitepapers, but I cannot for the life of me find an explanation of how Atlas horizontally scales for Serverless.

Is it the same horizontal scaling as dedicated, in which a shard key is used? If so, how is the shard key determined? Does MongoDb run analysis on the database usage and determine the shard key based on that?

Or do I define a shard key myself on my db so that Atlas knows how to horizontally scale?

Thanks