The Atlassian plugin framework is quite a broad topic, particularly because there are subtle differences in capabilities between the various concrete products (JIRA, Confluence, FishEye, Stash, etc.) and as such, there are resources all over the net for helping understand, interact with and program against the available framework components and API endpoints. I'm working through the process of adding configuration myself and have found the following resources very helpful (although they may be generic to the Atlassian plugin framework, most of the concepts still apply):
https://developer.atlassian.com/display/DOCS/Creating+an+Admin+Configuration+Form
https://developer.atlassian.com/stash/docs/latest/reference/plugin-module-types/plugin-modules.html