In a 5- to 6-quart pan over high heat, bring 2 1/2 to 3 quarts water to a boil.
Trim stem ends and pull any strings from fresh beans. Rinse beans and drain; leave whole or cut into 2- to 3-inch lengths.
Add beans to boiling water and cook until just tender to bite, 3 to 7 minutes. Drain.
Serve hot. Or immerse the beans at once in ice water until cool, to preserve texture (and, if green, their bright color). Drain and serve, or cover and chill up to 1 day.