Questions
Well, the easiest way is to have your character ask or empathize with other characters in play. "This war has to be pretty hard on you. Weren't you a civilian before?" These work well because they can be a chance to roleplay your character and ask valid questions of theirs.
Some players get stage fright though, so be mindful of that and willing to speak out of character ("Hey, it's cool. I was just hoping to give you a chance to spotlight your character a bit.")
"Remember the time?" loaded questions
This is a fun way, but requires the players to have some trust with each other. You ask loaded questions to them that serves as a starting point, and they take it as true and build off of it.
"Wait, you're not THE 'Nebula-Smasher' Johnson? How DID you escape the Queen's fleet?"
"Is this going to be like the last time you got us BOTH arrested? You still owe me..."
Players who are not good at improv will not roll well with this, and you may want to talk out of character to let people know you might do this.
Scenes and focus of play
This requires the whole group to buy in on it, but it works in a lot of games. "Hey, I'd like to have a scene where I can talk to (fellow PC) about the fallout from these failed negotiations. Can we do that?"
Openly requesting and declaring scenes makes it really easy and fun to set up scenes about beliefs, personality, history, and thoughts on the situation. It lets everyone know what you're interested in, and to spend time exploring characters specifically.
You have to be wary of the spikes in character Complexity
I'm going to use the Rogue as an example because this class represents the most obvious manifestations of how this kind of rapid leveling could be an issue; but in general, this is an issue that affects most classes and most levels of play.
Consider the first level. A level 1 rogue has the following features they need to contend with:
- Sneak Attack—Extra damage when they have advantage or able to benefit from Flanking
- Expertise—An especially high bonus to certain skills, meaning they will excel at certain kinds of ability checks
- Thieves' Cant—A "secret language" that can have interesting RP consequences.
Those are quite a few features, but it's balanced out by the fact that they'll be spending some time at level 1, only dealing with those features. They'll have time to work out how each feature works and how to best make use of them.
When they hit level 2, they're only gaining one additional ability, but it's a pretty significant ability:
- Cunning Action—simply gaining a few uses for a character's Bonus Action can completely change their combat style all at once. Being able to Disengage as a Bonus Action completely changes a character's relationship to the layout of the combat encounter, with respect to creature positions, geography, etc.. It's a lot.
Then, at Level 3, comes the archetype features. Every single archetype gains at least 2 new features. Even for archetypes like the Thief, where one of their features just improves upon the Cunning Action feature, the other feature is also giving some movement bonuses (or removing movement penalties).
If they're an Arcane Trickster, then they're getting
- Mage Hand Legerdemain—an extension to their Bonus Action abilities
- Spellcasting—and this is everything
- 3 new cantrips, one of which is Mage Hand
- 2 Spell Slots
- 3 new Spells (2 Illusion/Enchantment, 1 any school)
Now let's see what this feature gain looks like if we include level 2:
- Cunning Action—simply gaining a few uses for a character's Bonus Action can completely change their combat style all at once. Being able to Disengage as a Bonus Action completely changes a character's relationship to the layout of the combat encounter, with respect to creature positions, geography, etc.. It's a lot.
- Mage Hand Legerdomain—an extension to your Bonus Action abilities
- Spellcasting—and this is everything
- 3 new cantrips, one of which is Mage Hand
- 2 Spell Slots
- 3 new Spells (2 Illusion/Enchantment, 1 any school)
Do you see the problem? There's a lot that a character is gaining in terms of features just going from levels 1 to 3. As a consequence, it's quite easy for one or more of those features to fall through the cracks and forgotten.
Now let's just take this same character and jump them to level 9, without doing the step-by-step, and just see how many new features are showing up:
- 3 new spells (2 Illusion/Enchantment, 1 Any School)
- and the ability to replace up to all 6 of their spells with something else entirely, adhering to those school restrictions
- 2 Ability Score increases or Feats (are the feats adding new features?)
- Uncanny Dodge—this dramatically changes their relationship to especially strong melee creatures
- Evasion—this changes their relationship to powerful spellcasters
- More Expertise—more skills they can use to trivialize certain kinds of ability checks
- Magical Ambush—creates a very powerful use for their Cunning Action/Bonus Action Hide ability
This is a lot to keep track of! Each of these features have significant impacts on how this character would play on a moment-to-moment basis, and if these are things that the player can't keep track of, it'll dramatically reduce their power level.
This is less of an issue in normal play because you normally advance through these levels over the course of months or even over a year or two. There's a lot of time to work out how each feature improves upon the character they're playing. But compressed into the weekend or two between sessions, it could be too much.
Experienced Players can probably handle these changes—Probably
It should go without saying that if you trust that your players are either experienced enough or smart enough to be able to take these kinds of complexity gains in stride without struggling to keep track of their new features, then you have a lot less to worry about. I know there are lots of players—especially people who are used to playing Rogues—who would scoff at the list I've posted above and say "what, that's all I need to deal with?"
So I'm not here to tell you this is a bad idea, or that your campaign is going to suffer if you choose to do this. All I'm going to tell you is that if you plan to do this, it is very important that your players understand what you're signing them up for, and are prepared to deal with it. If they are, then I imagine this is a good way to quickly get players to a Tier of play that tends to be somewhat underrepresented in 5th edition.
Just be mindful that even experienced players might be playing a class they haven't touched before, and that they could get overwhelmed by having too many new features to keep track of.
Best Answer
There are no rules for this, but the DMG does have a few suggestions about "backup characters"
The DMG doesn't include any hard-and-fast rules that address this issue in detail (and neither does Xanathar's Guide to Everything).
However, it does briefly touch on the idea on a tangentially related section of DMG p. 236 titled "Small Groups". The section is primarily focused on campaigns with a small group of players, proposing that each player (who feels comfortable with it) control multiple characters, or that the DM fill out the group with NPC followers. However, it does add this suggestion at the end:
This guidance suggests that if the player's character dies, the backup character would be the same level as their original.
However, there's another mention of "backup characters" on DMG p. 92, under "Low-Level Followers":
This suggests that a player's backup character might not necessarily be the same level as their original character. (It also assumes that the DM built the NPC as they would build a player character rather than as they would normally build an NPC.)
It's up to the DM
As the DM, it's ultimately up to you to decide whether to let the player swap their character out for another character of equal level. You can also talk to the players to see how they feel about it.
Remember that the point of D&D is to have fun, so the goal probably shouldn't be to force a player to continue playing a character they're not enjoying... But on the other hand, it can be difficult to be immersed in a campaign or tell a coherent story - especially a character-focused one - if players swap out characters too often. (And, of course, figuring out how to explain the character change in-universe is its own problem.)
Ultimately, this will need to be a conversation between the DM and the players. Do what feels right to you and your players.