Instructions
Morph one of your Larvae into a Queen just as you would create any other Zerg unit: left-click a Larva, then left-click the "Morph to Queen" button in the bottom right or press the "Q" key. You'll need a Queen's Nest, which your Drones can build once you've upgraded your Hatchery to a Lair.
Damage a Terran Command Center until its health bar turns red. Remember that when Terran buildings are this badly damaged, they burn down, gradually losing health until they are destroyed, so don't wait too long moving the Queen into position.
Select a Queen, then right-click the damaged Command Center. The Queen will move to the building and disappear inside it. A moment later it will reappear, having transformed the Command Center into an Infested Command Center. This building will be at full health and will be capable of training explosive Infested Terran units. Note that the Infested Command Center, like most Terran buildings, can lift off and move across the battlefield; you may want to use this ability to relocate the building to a safer place behind your lines.