As of 2020, all Major League teams need to designate every player on the active roster as either a pitcher or a position player. The number of pitchers a club may carry on the 26-man active roster is capped at 13 from Opening Day through Aug. 31. From Sept. 1 through the end of the regular season, every team must carry 28 players on its active roster, with a maximum of 14 pitchers.
Only players designated as pitchers are allowed to pitch in a game, including in the postseason, with three exceptions.
1) The game goes into extra innings.
2) The player's team is winning or losing by more than six runs.
3) The player has earned the "two-way" designation.
To qualify for the two-way designation, a player must pitch 20 Major League innings and have 20 games played as a position player or designated hitter, with at least three plate appearances in each of those 20 games, in either the current or previous MLB season.
Once a player has earned the two-way player designation, he maintains that status for the rest of that season and the following season. And while he has that status, his team no longer has to use one of its pitching roster spots on him.
Players aren't able to switch from pitcher to position player during an ongoing season, but they could switch from pitcher to two-way player during the season once they have met the necessary requirements.