Getting published means entering into an agreement with a publisher, it is at this point you should be aware of copyright and licences.
Publishers often expect authors to assign copyright to them as part of the publishing agreement. As an author you are the first owner of copyright unless it has been claimed by a funder or an employer. Note: The Open University does not claim copyright over research outputs published by OU researchers.
Publishers will frequently require the transfer of that copyright in the form of a Copyright Transfer Agreement (CTA). Once this has been signed the copyright of the work belongs to the publisher. The publisher may grant some rights back to you e.g. re-use for non-commercial purposes or deposit in a repository, but that is up to the publisher, and they will vary from one publisher to another.
Always read the CTA; if the rights are too restrictive consider negotiating with the publisher. Author Addendums have been created to allow authors to revise publisher standard contracts, e.g. SPARC (The Scholarly Publishing and Academic Resources Coalition) Addendum and Science Commons' Scholar's Copyright Addendum Engine.
Even if you retain copyright, publishers may require an exclusive license to publish - which may mean you have much the same rights than if you had assigned copyright to the publisher.
If you publish in an Open Access (OA) journal you will most likely retain copyright of your article and you will be able to assign certain rights to users in the form of a licence.
If you publish in an OA journal you will most likely be asked to add a licence to the article to allow its re-use. Creative Commons licences are increasingly common and explicitly required by UKRI/RCUK for articles published using funds from the UKRI/RCUK block grant.
Gold OA articles are often published with one of the more permissive licences (CC-BY) which allows re-use only on condition of attribution. Articles made OA by the Green route are likely to have less permissive licences, e.g. Elsevier allow the Author's Accepted Manuscript to be deposited in an OA repository with a (CC-BY-NC) licence which allows for non-commercial re-use.