I pickle things on a regular basis. It is part of my job. Right now I have pickled ramps and day lilies in my kitchen, soon I will be doing Romanesco broccoli and white and gold beets. It allows me to preserve out of season items for year round usage. My basic pickling recipe is to mix white balsamic vinegar and water 50/50 and add salt and sugar to the mixure until it no longer tastes vinegary; you then heat that mixture to a boil and pour it over the item and wait 24 hours to 12 months. If you just use salt without a vinegar based liquid you aren't pickling it but rather salt curing it (which is a good technique for making things like pancetta, guanciale, prosciutto and salt cured fish but isn't pickling).
Depending on what you are pickling you might want a different balance between salt and sugar plus different spices, herbs and other flavor agents (you can also use different vinegars for different flavors, red pepper vinegar and good apple cidar vinegar (Mengazzoli from Italy) produce beautiful results). Vinegar is acetic acid, by adding salt to it you make sodium acetate which is less sharp in flavor but still a good presevative; sugar mellows the flavor in a different direction, you need both for it to work well. This is the balance that you play out in making a pickling medium, more salt is good for making dill pickles but more sugar is better for other things. The day lily flowers that I pickled this summer were heavily on the sugar end plus I added a lot of vanilla bean which adds to the floral aspects of the flavor profile. The ramps I pickled were with two different stategies: sugar based and with anise and tarragon for the summer and salt based and with warm spices like ginger, allspice, nutmeg and cinnamon for the winter. The freakiest thing I have ever pickled was lamb's tounge, not only was it delicious but it looked like it was ripped straight from Satan's jowels.
When you are done with something like vanilla pickled day lilies you can make awsome vinagrettes out of the pickling liquid.