When your manuscript is accepted for publication the publisher will send you an author publication rights form to sign and return. Read this document carefully before signing.
Agreements vary, but usually require you to sign a document transferring all rights including copyright to the journal publisher. This may limit your wider redistribution of the publication in other sources such as subsequent publications, distribution in class, archiving in an online repository or on a public web page. Sometimes assigning rights in this way may be in return for you to use the manuscript for educational or research purposes, but not for commercial resale.
If you are not happy with the author publication rights form there are options. Variations to a publisher agreement are available to use and adapt to adjust rights agreements, eg: