The Philly Shell, also called the "crab" defense posture is not for beginning boxers. It's a riskier defense that sacrifices some coverage for the ability to counterpunch more swiftly. While you're learning, you can expect to get your bell rung because of the limited coverage as you work toward the point where it gives you an advantage in the ring. However, successful fighters like James Toney and Floyd Mayweather Jr. used it to devastating effect during their careers.
Get into your standard boxing stance: feet about hip-width apart, limbs loose, back straight but ready to flex.
Set your lead hand across your torso, running at rib or chest height with your fist on the opposite side of your chest.
Raise your rear hand to face level, to the side of your face.
Hunch your lead shoulder to protect your face as much as possible.
Slip to the right -- your right -- of incoming punches and respond by shooting out your rear hand.
Do your roadwork. The Philly Shell requires significant mobility if you want to keep your head safe. This means staying in optimal condition to remain light on your feet in the later rounds.
Use a slip bag. This is a lighter bag that swings on a chain for you to dodge. This is the best tool for building the reaction time you need to successfully use a Philly Shell.
Work with a sparring partner once you can dodge the slip bag more often than you don't. Practicing the Philly Shell in the ring against an opponent motivated to punch you in the head is the only way to improve your Shell enough to use it in a live fight.