Boil or steam in their skin until a bit soft. This should take 15 to 20 minutes, depending on how big they are, and how many you have in the pot at once.
Let cool until you can safely handle them.
Peel; discard peel (or reserve for another non-canning use such as stock).
Chop into roughly 3 cm (1 inch) cubes.
Pack into half-litre (US pint) jars or 1 litre (US quart) jars.
Leave 3 cm (1 inch) headspace.
Top up with clean boiling water (such as from a kettle, for instance), maintaining headspace.
Debubble, adjust headspace.
Wipe jar rims.
Put lids on.
Processing pressure: 10 lbs (69 kPa) weighted gauge, 11 lbs (76 kpa) dial gauge (adjust pressure for your altitude when over 300 metres / 1000 feet.)
Processing time: Half-litre (US pint) jars for 65 minutes OR 1 litre (US quart) jars for 90 minutes.
Notes
The reason you don't peel them first is because raw sweet potato will turn an unsightly brown in the air very, very fast.Mashing the sweet potato is unsafe; the density causes heat penetration issues in the jar during processing.The cubes of sweet potato are expected to be at least luke-warm going into the jars. (So, if you prepped them the day before and overnighted them in the fridge, you need to heat them up again somehow such as in a microwave before starting the canning process.)If you have small sweet potatoes, you don't need to cube them; you can just quarter them.Optional per ½ litre (US pint) jar (double for litres / US quarts): 1 tablespoon lemon or orange juice (some say can help prevent darkening; others say it just adds an interesting flavour.)When you go to use these, drain them. Consider saving the drained water and freezing it in a tub for use in soups, etc: it makes a wonderful broth.