For fresh beans, place 1 cup of water in a medium saucepan and bring to a boil over high heat. Add beans, reduce heat to low, cover and simmer for 5 minutes. If you are using frozen beans, defrost, and drain.
Meanwhile, heat olive oil in a medium, non-stick skillet over low heat. Add onion and sauté for 5 minutes, stirring occasionally. Add garlic and sauté for 1 minute more.
Drain beans and add to onion and garlic. Sauté for 10 minutes, stirring occasionally. Taste and adjust for salt and pepper.