Here is a basic explanation you need for the creation of your first plug-in:
https://developer.rhino3d.com/guides/cpp/your-first-plugin-windows/
Let's go through it step by step and explain what is what.