Trial and error along with good recipes and lessons from my mom, grandma and mother-in-law. It just takes a lot of practice and believe me I'm still learning.
I tried my hand at pesto sauce once that my hubby and his brother forced down. I think that was my only mistake bad enough that was bad enough that they gag when they hear the word pesto. They'll give me a hard time about that until the day I die. It was so bad I didn't even eat it.
Just keep a bag of frozen Bertolli pasta or something simple like that that you can make in 10-20 minutes just in case things go wrong.
You'll get it!