Boil the spaghetti noodles in boiling water.
Chop the onion and garlic.
Sauté garlic and onion in a pan with olive oil.
Add chopped tomatoes and simmer.
Put the cooked spaghetti into the sauce and toss together.
Season with salt and pepper.
Plate and garnish with basil.