When I was a kid, there was often a jar or bowl of sauerkraut in my parents' refrigerator. Bought straight from the barrel on Manhattan's Lower East Side - or from a kosher deli that bought it straight from a similar barrel - it was crunchy and sour, and nothing was ever done to change that. We mostly ate it cold as a side dish with frankfurters or their bigger relations known as specials, usually in the company of half-sour pickles - and of course we had it on hot dogs nestling in buns. If it ever was heated, it was just to warm it up. It was good; I never really thought about how it might be better, or at least different.
As I grew older, I learned that other people tinkered with their sauerkraut and actually cooked it, for instance Alsatians (choucroute), Hungarians (things like Szekely goulash) and Poles and their neighbors (many dishes including the complicated and marvelous bigos). In fact, it turned out that just about everybody except my parents and their cohort was doing more to a container of sauerkraut than simply opening it.
I also learned that a batch of cooked sauerkraut is a useful thing to have around the house, and on a couple of occasions I've written about specific dishes using it as a combination sauce, accompaniment and cooking environment. By "cooking environment" I mean that you can brown a piece of meat (or indeed fish), add prepared sauerkraut to the pan and braise the principal ingredient in the kraut. This generates lots of flavor and yields a surprisingly coherent dish, for example with pork or lamb.
In the latter link, I describe the way I cooked my sauerkraut that day. It can in fact be simpler, as it was the other night, when all I did was sweat a sliced onion in lard with salt and thyme, then when it was soft add a heaping teaspoon of brown sugar (optional) and let it caramelize a little. To that I added a pint (half-liter) container of sauerkraut that I'd soaked for a couple of minutes and squeezed fairly dry in my fist, along with a bouquet of parsley stems (it's much easier to tie this together before you cut it off the bunch - see the photo). I moistened it with a good half cup (120 ml) of white wine and let this boil down by about half, then covered it with vegetable stock. Chicken stock yields a richer and softer flavor, but vegetable is what I had in the fridge. I added salt, a few whole peppercorns, a bay leaf, a sprinkle of caraway seeds and half a dozen crushed juniper berries, brought it up to the simmer and cooked it, covered, over low heat for 45 minutes. Carrots are a good addition, and so is paprika, but this basic version had neither.
The first night, I used the brown-and-simmer method for one of the most obvious ingredients: garlicky, smoky Polish-style sausages from a good New Jersey deli-man who sells them on the street in our neighborhood every Sunday (there's a little encampment of food stalls, though it's not what I'd call a real market). Come to think of it, it was from him that Jackie and I bought the sauerkraut too. The side dish was mashed potatoes.
This means that we had leftover kraut and leftover mashed potatoes. In this Polish context, they demanded to be used as a filling for pierogi, and a few nights later that's just what happened.
To make the filling, I squeezed the leftover sauerkraut dry, yielding about a cup (235 ml by volume). With my hand, I mixed in around the same amount of mashed potato and enough salt and pepper to season the filling vividly. It seemed a little wet (the potatoes had been mashed with milk), and I made up for this with a small handful of dried breadcrumbs - depending on your potatoes and how powerfully you squeeze the sauerkraut, this may or may not be necessary. There was plenty of onion in the sauerkraut, but if there hadn't been I'd have sauteed a small onion and added it to the filling.
For the dough, I used 200 g (maybe 1-1/2 cups) flour, two smallish eggs, a quarter cup (60 ml) of milk and a little salt, all kneaded together as for any pasta dough. I like my pierogi small, so once I'd rolled the dough on a hand-cranked pasta machine (to the second-thinnest setting, and working on a quarter of the dough at a time so it wouldn't dry out), I cut circles with a 6-cm (2-1/3-inch) circular cookie cutter, placed a heaping teaspoonful of filling on each, then folded them in half, stretching the dough to cradle the filling comfortably. Once I'd pinched the dough closed, forming half circles, I crimped the edges using little overlapping folds to make sure they didn't open in cooking. If you really pinch them tight and/or slightly moisten the dough before sealing, this isn't necessary, but it's the way I've always done it and I like the way it looks. You can see how that folding is done at about one minute into this video (which is otherwise irrelevant to pierogi-making).
As I generally do with ravioli and suchlike, I froze the pierogi on a parchment-paper-lined sheet pan as soon as I'd formed them. This prevented the moisture in the filling from compromising the dough. From frozen, they took five minutes to cook in gently boiling salted water, and about the same length of time to eat with a mess of onions sauteed in butter.