How to write my own plugin

hi, I was trying to figure out how to write my own plugin. There is not a lot of detail on how to do this. I would like to create a plugin for jquery datatables ( DataTables examples - Examples index). I feel it would be similar to how apex chart works. I just do not know what is needed. I keep seeing custom plugin, private scr, and plugin installs. I don’t know what files to put in .zip for install, or the api to implement?