Put 2-3 cups of water in a kettle and bring to a boil.
Peel and thinly slice the red onion into 1/4" slices. If using garlic, peel and slice in half. If using, jalapeno, thinly slice half of the pepper.
Place the onions (and garlic and jalapeno, if using) in a colander and set in the sink.
Choose a glass container for storing the pickled red onions, as plastic will not work. In that container, add the salt and sugar and vinegar and whisk well until the salt and sugar have dissolved. Toss in any additional items such as dried chili, thyme, peppercorns, etc. and stir well to combine.
By now the water might be boiling. When it is, gently pour over the onions in the colander and let the water drain well.
Shake the colander to remove any additional water and then add the onions to the container of vinegar, stirring gently to evenly distribute the flavors and help wilt the onions a bit.
Let sit for one hour on the counter, stirring occasionally and then chill and store in the refrigerator. They will keep for several weeks, but you're going to devour them in less time, just like we did.