Heat a large skillet over medium-high heat. Add the oil and swirl to coat the pan. Add the onions and saute until translucent and soft, 3 to 5 minutes. Add the garlic and stir for another minute.
Add the tomatoes and cook until soft and the juice is slightly evaporated, 5 to 7 minutes. Stir in the salt and pepper. You can serve the mixture hot or cold. It will keep in the refrigerator for about 1 week.