Windows: Hold the Alt key and enter the numeric code on the numpad (e.g. Alt + 0178 for ²). The character appears when you release the key.
macOS: Use the Option key. For ² = Option + 00B2 (with Unicode Hex Input enabled). Easier: open Character Viewer with Ctrl + Cmd + Space.
Linux: Press Ctrl + Shift + U, enter the Unicode code (e.g. 00B2 for ²) and press Enter. Alternative: use the Compose key if configured.