Before I continue, I should point out that Moodle is an open source community, we work on the basis of sharing ideas and code freely, so that we can all benefit from each others' work and experience. If you aren't comfortable working like this, you might find it difficult to particpate in the commuity. This being said, I'll attempt to answer your questions:
You should submit a zip file of your plugin to the Plugins directory. It will be reviewed and made available for other users to install. Many plugins are also hosted on GitHub or another public hosting platforms, for people to submit bug reports and patches.
You (or your employer, if you have one) will probably own the copyright of your code and assets. If you are unsure of this, speak to a lawyer. Moodle plugins are ususally released under the GNU General Public License (GPL), which means anyone can take your code and modify it, but if they distribute it or any modified version, they have to do so under the same license. This isn't "stealing", since it's explicitly permitted by the license. Again, if you are unsure of the license terms you wish to publish under, speak to a lawyer, ideally once familiar with open source licenses.
You don't have to make your plugin publicly available at all. You could give it directly to your clients or whoever you are developing it for, under your own license*. I don't know if the Plugins directory accept submissions that aren't GPL-licensed, but I suspect not. In any case, since PHP is an interpreted language, you will be distributing the readable source code.
*There is an argument that, since you will probably be copying code from Moodle or another plugin to develop your plugin, your work is derivative work of GPL code and must therefore be GPL. Again, speaking to a lawyer is a good idea if you are thinking of using a different license.