It is important to process your beans a soon after harvesting them as possible, and use firm, straight beans not lumpy, over ripe, or dry ones.
First, wash the beans in cool water. Then, the ends of the beans need to be trimmed, removing about 1/4 inch from both the stem and the blossom ends. This can be done just with your thumb and first finger by snapping or breaking off the ends, or using a knife. You may also cut the beans into smaller pieces if you wish, though I prefer to leave mine whole. Since I usually have quite a bowl full when I get around to putting them up, I sometimes will use it as a reason to rest in the evening--I can sit with my feet up and a bowlful in my lap, snip all the beans, then pop the in the fridge overnight and finish the process the next morning.
Something special I think of whenever I am prepping the beans, is the image of my great grandmother sitting on the porch with a big bowl in her lap, snipping lots of beans...just makes me smile. Putting up beans also brings to mind one time when I was very young and a bunch of the family was together at my great aunt's house. I can't remember all the details but the gist of it is that we had big garbage bags full of fresh beans, and everyone was sitting around the table snippin' them...well, I was snitchin' them instead--I munched on so many that I ended up with a tummy ache! I still LOVE fresh, raw green beans!
Next you will need to blanch the beans. All fruits and vegetables have enzymes which help them grow, and after harvesting the enzyme activity continues. Blanching the vegetable halts the enzymes, and stops the ripening. Produce that is frozen without blanching can have discoloration, toughness, and loss of flavor.
I have kept the bagged, blanched beans in the freezer for up to a year with no problems at all.
Beans can also be canned, but I have never attempted that--not yet--I think thye have to be processed in a pressure canner (which I do not have) or else pickled with a salt and vinegar mixture of one kind or another. Oh wait, I just remembered I did add green and yellow beans to a pickled-pepper-veggie-mix that I canned a couple years ago. The vinegar based brine was a little on the spicy side with dried crushed red pepper in it, and the beans were really quite good that way along with the cauliflower, cucumber, bell peppers, onions, and carrots that were in the mix. One more idea that I might try is to make our own 3 bean salad with the green and yellow garden beans and a can of red kidney beans....add a little finely chopped onion and some Italian style dressing....sounds pretty good?!