What do you do to coffee beans that increases the quality of the coffee?

You just roast the coffee beans (a popcorn popper works if you are roasting at home). The right timing helps but its usually the type of coffee bean that determines quality.