As soon as your work is in a tangible form (a Word document, a web site, a recording), the copyright is yours. You own the right to:
• reproduce your work
• distribute your work
• prepare derivative works
• publicy display or perform your work
• authorize others to do any of the above
You can give away or sell any or all of your rights. Giving up your rights may limit access to and impact of your work.
When your manuscript has been accepted for publication, you sign a publisher agreement. This agreement may require you to transfer your copyright to the publisher.
You can attach an addendum to the publisher agreement that allows you to retain some or all of your copyright. With an addendum, you could retain the rights to use your manuscript in a later work and makes copies, and the rights to publish your manuscript on your personal web site or in an open access repository.
A publisher is not obligated to accept your addendum. If the publisher does not accept it, explain your position and why you need to retain your rights. If the publisher still doesn't accept it, consider publishing elsewhere, particularly in an open access journal.