Roast your own coffee in the pan
Probably the easiest way to roast your own coffee: spread raw coffee beans evenly on the bottom of a pan and heat it on the cooker, stirring constantly. After about 5 to 10 minutes, the beans start to "crack"; after about 20 minutes, even a second time. In roasting jargon, this "cracking" is called 1st crack or 2nd crack. For very lightly roasted coffee, take the beans out of the pan immediately after the 1st crack and cool them as quickly as possible. For a medium or darker roast, leave them in the oven a little longer - but at most until the 2nd crack.
For more information on what exactly happens during roasting, see this post; for details on the different degrees of roasting, see this post.
In terms of equipment, this method is tempting: you need nothing more than a pan, a wooden spoon and a hotplate. But unfortunately, that's it for the advantages. Roasting coffee in a pan causes a lot of smoke and it is even recommended that you wear protective goggles, as the beans tend to jump up to your face when you crack them.
All this would be acceptable if the roasting result was right. But unfortunately this is not convincing: when roasting in the pan, the beans are roasted very unevenly - some parts are dark, others still almost unroasted. For a good roasting result (and ultimately fine coffee), the raw coffee beans must be roasted evenly from all sides. Unfortunately, this is impossible with pan roasting. Conclusion: For very first roasting attempts or experiments, the method is ok. But if you want to roast fine coffee yourself, you won't get far with this method.