There are two approaches you can choose between. Both of them needs to be done in the design phase of your project.
The first one is to make a plugin based system, using DLL's(dynamic link library) on Windows, or shared libraries on UNIX platform.
You start of creating an executable core, with the engine and other things you don't want a modder to have access to.
However keep in mind what you want the modder to have access to, and export these functions.
Now you can choose to make the game as a mod, or create the game explicit in the executable.
The first approach is the easiest way, and used by Valve for example.
The second approach is to give the modder a scripting language, which is linked with some of the functions in your game.
This can easily be done with Python, or Lua. Most games made to day have scripting support, used during the development cycle.
Unreal Tournament uses this approach for example.
When it comes to assets, you need to have a copyright license. The copyright license must be there even if you don't make the game moddable.
However most games use compiled assets, which often are hard to edit or use. This way the modders can only use your assets in your game, but can't edit them.
You should also ship the tools used for compiling assets, so that the modders can create their own assets.