How does switching, or dropping, weapons work in D&D 5e? Does it take an action?
For instance, if I have a polearm equipped, can I switch to two handaxes, throw the handaxes, and then switch back to the polearm at the end of my turn?
Ok, we have the by the book, what Mearls has said, and how you probably want to play this in your game.
By the book, draw or stow can be done for free, you can do one of these per turn as the part of a move or action. However, if you want to do both, you're stuck burning your action to do so. If you're TWF you're in an even worse way, (though the Dual Wielder feat fixes the action economy here).
PHB page p190 states:
You can also interact with one object or feature of the environment for free, during either your move or your action.
- Draw or sheathe a sword
Mearls has said in tweets that you're OK to use your free action to swap weapons rather than spend your action to draw and stow. That the intent here was to curb over use and also to not burn you on the action economy to swap weapons. (see this convo)
Ultimately, for your game, I think it's up to you to decide between these two rulings. Personally, I prefer my character to not get burned by the action economy here and have ruled that quick swaps of weapons (especially when it's commonly used load outs) can be done as part of the attack. I don't make a stink about it, and assume the PCs in my games are competent at what they do.
If you really have to make this work, dropping your weapon is completely action-less, so you could do that. It's messy, and prone to issues if you get moved off your space (you can't pick your weapon back up), but maybe that's just the cost of weapon juggling?
If it was my game, no. I don't think that's in the spirit of the rules. If you think about a polearm, you're probably wielding it with both hands, you've got to hold it with at least one, and it's going to take some time to stow it. While drawing throwing axes may be very quick if you're carrying them in a suitable way (and I'm assuming any sensible adventurer would do so), you can't negate the time it takes to deal with your polearm.
Now if a player gave this to me, I'd probably say they can throw one axe, while holding their polearm in their other hand, and be ready to use it again next turn. I don't think it's reasonable to allow a character to stow their polearm and draw two axes within the same turn. As mentioned elsewhere, dropping it is fine, but there are obvious consequences to that which the player might not be willing to take.
RAW, you can stow your weapon as your one free action at the end of your turn, then draw a different weapon as your one free action at the start of your next turn. This does not come without a cost - for anything between turns, such as opportunity attacks or the Dual Wielder bonus to AC, you will be unable to use a weapon (and personally as a GM, I might rule that things like the Parry maneuver from the Battle Master archetype require a weapon, at least in medium or light armor), and without the Dual Wielder feat Two-Weapon Fighters still require at least one action to fully switch.
In my opinion, this serves quite well balance-wise as-is; it prevents unreasonable amounts of weapon juggling, while still allowing you to switch around one or two weapons for free, assuming you're prepared. Thematically speaking, it seems sensible that enemies can more easily escape your reach while you're busy swapping weapons. Also, as dropping weapons has no cost, you can always do that instead if you're in a hurry.
We do this in a game I play; stow/draw counts as half your movement, if you do both you don't move unless you take your action to dash. Dropping still action less. And for twf drawing/stowing both still only half your movement. I like it, feels like its keeping some of action economy penilty with out stealing your action.