Please read about pickling and How to Process.
Prepare a water-bath canner, gather all your canning equipment, and have ready 4 clean, hot pint jars.
Wash, then trim the tops and roots to 1 inch:
Place in a saucepan, cover with water, and simmer just until tender, 30 to 40 minutes. Drain, reserving ¾ cup of the cooking liquid (discard the rest). Remove the stems, roots, and skins. Leave baby beets under 1 ½ inches whole. Cut large beets into ¼-inch-thick slices or wedges.
Peel, thinly slice, and set aside:
Transfer the reserved beet cooking liquid to a wide pot and add:
Bring to a boil, stirring until the sugar is dissolved. Add the beets and onions and simmer for 5 minutes. Using a slotted spoon, pack the vegetables into the prepared jars, then add the hot vinegar solution, leaving ½ inch headspace. Remove any trapped air from the jars and adjust the liquid level if needed. Wipe the rims. Place lids on jars and screw on rings until fingertip-tight. Process for 10 minutes. Let cool completely and store as directed.