Sofrito means "gently fried." The sofrito is a mixture of sautéed ingredients—onions, garlic, peppers, tomatoes -that gives depth of  flavor to many dishes in Spanish cooking, from paella to stew, vegetables to pasta. Sofrito is the first step in many recipes. It’s a procedure, a technique and a sauce.

While a sofrito can be prepared in any pan, it's traditionally made in a cazuela, an earthenware casserole. A cazuela takes longer than a metal pan to come up to temperature, but then it maintains a steady, even heat. Ingredients such as chopped onions can be browned on a high heat or they can be "poached" in oil on a low fire until nearly melted.

Often the sofrito serves as a cook-in sauce, added to foods, usually with additional liquid such as wine, to continue cooking until done. In the case of shellfish, this is a matter of minutes, whereas stewing beef or lamb might take an hour or more and require additional liquid. Herbs and spices are added, depending on what is being cooked in the sofrito.

The essential ingredient in sofrito is olive oil. The basic procedure is to heat olive oil in a cazuela or frying pan and sauté chopped onion until it is lightly golden. Sometimes chopped green peppers are added as well. Once the onions are softened, peeled and chopped tomato is added and allowed to “fry” on a high heat for a few minutes.

Seasoned with salt and pepper, the sofrito simmers until the tomato is somewhat reduced. It's now ready to be added to the main food. For example, in preparing menestra (a vegetable medley), green broad beans, peas and artichokes are first blanched, then finish cooking in a sofrito of onions, mushrooms, tomatoes and bits of ham.

If a larger quantity of tomatoes is used, the sofrito becomes a basic tomato sauce. It can be left chunky or sieved to make a smooth sauce. Chicken, pork or bonito that have been first browned in oil are added to it to finish cooking. Or the sofrito sauce can be served over cooked pasta, for example.

A sofrito of onions, peppers and tomatoes may be the starting point for lamb stew, fish soup or chicken in sauce. And, according to Valencia experts, the secret to good paella is the sofrito. The paella ingredients are fried very slowly to develop their flavor. First, olive oil in a wide steel paella pan on a grate over hot coals. Pieces of chicken or rabbit are added to the pan and allowed to brown very slowly. No rushing. Next, some chopped garlic and grated tomato pulp go in, followed by wide flat green beans and fat lima beans. Once the meat is nicely browned and almost cooked, liquid is added and a golden mixture of saffron. Once the liquid boils, the rice is stirred in. As the rice cooks, it absorbs all the flavors of the sofrito.

Janet Mendel is a food writer based in southern Spain. She is the author of several books about Spanish food, including Cooking in Spain and Tapas: a bite of Spain (Santana Books, Spain); My Kitchen in Spain and Cooking from the Heart of Spain-Food of La Mancha (Harper Collins), and Traditional Spanish Cooking (Frances Lincoln, UK).