Snap the green beans and cook them until just tender in lightly salted water (about 3 minutes). You can also use frozen green beans for this salad; in that case, cook them directly from frozen for 2 minutes.
Rinse the cooked beans with cold water and let them drain in a sieve. The cold "bath" stops the cooking process, preserving the crispness of the beans and maintaining their fresh green color.
Peel and finely chop the red onion.
Mix the beans, red onion, and feta (crumbled or cubed) together in a bowl. Toss the salad with a little olive oil, salt, and pepper.