Vinegar is primarily used to flavor and preserve foods and as an ingredient in salad dressings and marinades. Vinegar is also used as a cleaning agent.