
How the DH works
Before the game, a team can list a designated hitter in the batting order for its starting pitcher. The DH takes regular turns at bat but does not play defense in that role. The pitcher plays defense but does not bat.

Substitutions
A pinch hitter or pinch runner can replace the DH, and that substitute becomes the new DH. The DH position stays in the same place in the batting order. A team cannot freely move the DH to another lineup spot during the game.
How a team can lose the DH
If the designated hitter takes a defensive position, or if certain lineup moves put the pitcher into the batting order, the team can lose the DH for the rest of the game. The pitcher or later pitching substitutes may then have to bat in the affected lineup position.
The starting pitcher and DH rule
MLB also allows a starting pitcher to be listed as the DH. If that player is removed as pitcher, the player can remain in the game as DH. If removed as DH but still pitching, the player may continue pitching. This is commonly associated with two-way players.
Bottom line
The DH separates batting from pitching. It keeps a specialist hitter in the lineup while the pitcher handles only defensive pitching duties, unless the lineup is changed in a way that ends the DH privilege.
