Peel and finely chop the cloves of garlic and onions. Wash the chilli pepper and cut into thin slices.
Heat the olive oil and lightly fry the processed ingredients. Season with thyme, oregano and salt. Add the olives, capers and chopped tomatoes. Put the lid on the pan and let it simmer.
In the meantime, heat the salted water in a saucepan, add the olive oil and a little salt and cook the spaghetti in it.