This repo has a basic template you can reference when building your own mod. It has lots of comments to help you along the way.
The root
folder is the same as the root folder in Godot's filesystem.
Download from Releases.
For other games, see the example mods on their own repo or GitHub organisation. Note that game-specific examples strip away the basics, so this example is always a great place to start.