You need to let the pods ripen all the way (they will be papery and beige) on the plant, so that the seeds will mature if you want to re-plant. Seeds should feel dry and hard, not springy.
But if you want to harvest green beans to eat before that, don't let any mature, the plant will stop producing. The green beans are best before the seeds really start to form in the pods.
If you need more seeds to continue planting, either buy another packet or just let a couple of plants mature the pods for the next round of seeds. It may be a month or more before you have seeds to plant.