Please have a look at the following links to get you started.
https://codex.wordpress.org/Writing_a_Plugin
https://premium.wpmudev.org/blog/wordpress-plugin-development-guide/
https://www.elegantthemes.com/blog/tips-tricks/how-to-create-a-wordpress-plugin
http://www.wpbeginner.com/wp-tutorials/how-to-create-a-wordpress-plugin/
https://code.tutsplus.com/tutorials/create-a-custom-wordpress-plugin-from-scratch–net-2668