How to type a squared sign after a number on word?

The simplest way is to type a "^" (called a "carat", it is the result of hitting SHIFT and the "6" key) and then "2". The result, "X^2", would be read as "X raised to the second power."

If you are trying to get a superscript 2 ("X2"), you would type the "2", then select it with your mouse (place your curser to the left of the 2, hold down the left mouse button, move your curser to the right of the 2, and then release the mouse button), and then format it to superscript. How you specifically do that depends on which version of Word you have - in Word 2002 (used on Windows XP), you would chose FORMAT from the Menu Bar, then FONT, and then chose the tick box marked "Superscript". For Word 2007, the concept would be the same but the execution a bit different.