Place a large frying pan over medium heat. Heat olive oil. Fry garlic until the raw smell disappears. Fry onion until soft. Add the tomatoes along with ½ cup of water, and bring the sauce to a boil. Simmer for 5-10 minutes. Add in the chopped basil or parsley, and leave it to simmer for few minutes. When done, season with salt and ground black pepper.
Serve with cooked pasta. Garnish with grated cheese just before serving.
Notes
If you are using fresh tomatoes, do not use the skin.