Range-based sharding in MongoDB splits data by ranges of a shard key. When a document is inserted, the system looks at the shard key value and compares it to the defined ranges. It finds which range the value fits in and sends the document to the corresponding shard. For example, if the shard key is age, and ranges are set as age less than 30 for Shard1, age between 30 and 59 for Shard2, and age 60 or more for Shard3, then a document with age 25 goes to Shard1, age 45 to Shard2, and age 65 to Shard3. This method helps keep related data together and balances load. It is important that the ranges cover all possible values so every document can be routed correctly.