The Planetary Fortress is an optional upgrade for your Command Center. It has double health, increased armor, and energy/health regeneration, and has the ability to attack.
Upgrading to a Planetary Fortress is usually a defensive tactic, but some players also upgrade it for the double energy regeneration, granting them twice as many scans as a Command Center. It costs 350 to upgrade to Planetary Fortress - the cost of an observer, and it will increase your survivability.

If fully upgraded, the Planetary Fortress (or PF), can be very hard to kill. Each base defense damage upgrade increases its damage by 25 and attack speed, each Armor upgrade increases armor by 3, and each Range by 1 range. Fully upgraded, the PF has an incredibly fast attack speed and high damage, and it will slaughter anything that comes to attack it. Although it is extremely rare to find a player so invested in defenses that they will have it fully upgraded, but if one player is found, this player can drag a game on for hours throwing out auto turrets and slaughtering any mercs/marines that come to attack it.
The best way to take out a PF is to either constantly throw units at it until it dies, use heroes, baneling bomb it, or use void rays.

Generally, the PF is used as a last ditch defense upgrade to drag a game on and delay the inevitable, or a strategic early-game investment into extra scans.

Activating "Crayon's Code" (see the help menu "Special Thanks" tip), will change the name of all Command Centers to "Castle Crayon", and all Planetary Fortresses to "Fortress Crayon". This does nothing to change the gameplay other than giving a few laughs.