The Unstructured Supplementary Service Data (USSD) code (which we won't reproduce here) apparently only works on Samsung phones running Touchwiz, and only if you are directed to the dodgy destination while inside the stock browser (rather than Chrome, for example).
ENGADGET: 'Dirty USSD' code could automatically wipe your Samsung TouchWiz device (updated)