In a large saucepan or frying pan, heat the oil, then add the onions. Reduce the heat and cook the onions until they are very soft. The onions must disappear into the tomato sauce. This will take at least 40 minutes. Some 5 minutes before the end of cooking, add the garlic.
Now add the tomatoes and stir to break them up. Season with salt and pepper and cook slowly, stirring occasionally