What squared means
Squaring a number means multiplying it by itself. 2 squared is written 2² and equals 2 × 2 = 4. In the same way, 3² = 9, 10² = 100 and 12² = 144. The raised 2 is an exponent, and the name comes from geometry: a square with 3-unit sides covers 3² = 9 square units.
That is also why area units carry a ²: m² is a square meter and ft² is a square foot. A room that is 4 m by 5 m has a floor area of 20 m². Undoing a square is the job of the square root: √9 = 3.
The ² character
The squared sign is the Unicode character SUPERSCRIPT TWO (U+00B2). It sits in the old Latin-1 block together with ¹ and ³, which is why it has a Windows Alt code and the HTML entity ². Higher digits such as ⁴ come from a different block, so in some fonts ² and ⁴ look slightly different in size or height.
East Asian fonts also include one-character units such as ㎡ (square meter) and ㎢ (square kilometer). They look tidy in a table, but m² typed as two characters is the standard form and displays in every font.
How to type the squared symbol
On Windows, hold Alt and type 0178 on the number pad, or Alt + 253. In Word, type 00B2 and press Alt + X, or select a normal 2 and press Ctrl + Shift + = for superscript formatting.
A Mac has no default shortcut. Press Control + Command + Space, search for "superscript two", or add a text replacement in System Settings > Keyboard. On Android, Gboard shows ² when you long-press the 2 key on the symbols keyboard; iPhone keyboards have no ² key, so copy it from here or save it as a text replacement.
In HTML, use ², and in LaTeX ^2, as in m^2. For the full set of raised digits and letters, see superscript symbols.