So, your first task is to identify all the potential authors of a work. An author is someone who contributes copyrightable expression to the work.
What kind of expression is copyrightable?
Copyrightable expression is original authorship, fixed in a tangible medium of expression.
Examples of copyrightable expression, assuming they are original, could be: poetry; prose; software applications; artwork; musical notation; recorded music and/or song; animations; video; a web page; blog posts and comments; architectural drawings; or photographs.
Examples that do not qualify as copyrightable expression: facts; exact duplications of public domain works; ideas; systems; works created by employees of the Federal Government; titles and short phrases; logos and slogans; or forms that only collect information (rather than provide information).
Does the author or an employer own the contribution?
The essential questions here include:
Unless the work for hire rules apply, the creators of the work are its authors and owners.
Joint works
No matter how many collaborators, the work will only be a jointly owned work if the collaborators intended, at the time of creation, that their contributions would be joined into a unified whole and that they would be joint authors. Many times collaborators agree on the first point, but they really haven't thought about the second point. Because intent to be a joint author is subjective, it's quite likely that different collaborators have different ideas about this, if they've thought about it at all. This makes intent an excellent issue to bring up for discussion at the beginning of a project. Often there is a primary author and others whose roles are not as great. It is especially important for primary authors to think about the question of whether the resulting work will be theirs alone, or jointly owned with everyone else, and convey their thoughts on the matter early on. It is even better to document such discussions in an agreement of some kind, even a very informal one.
Has the author conveyed away any of his rights?
There are many reasons why an author might transfer all or part of their rights. The first one that comes to most peoples' minds is the transfer of copyright to a publisher as a condition of formal publication. But there are many others.
On the other hand, a research funder or institution may require that the author retain a non-exclusive right to deposit their work to a public-access repository. In such a case, a subsequent transfer of the author's copyright to a publisher would not convey the right that the author had retained. In other words, the publisher would take the copyright, subject to the pre-existing right that the author was required to retain by their research funder.
If you don't like the result - try to change it!
Once you know who owns what, you may decide that it's not at all like it should be. If so, you'll need to make some changes to bring about a more desirable result. If you feel you need an assignment of copyright from someone who contributed, to avoid a potential joint authorship issue, the assignment must be in writing and signed by the owner of the copyright. This might also be necessary if a contributor hired someone to write computer code, take photographs or do design work without a contract. Probably neither of them thought the person being hired would own copyright in what they produced, but that's what the law would dictate as the result. It is better to have the contract at the beginning, but it can be fixed after the fact, if the parties are willing. Even if you only need a license (e.g. permission to use a work rather than assignment of all the rights in it), it should be in writing so that the rights to use are clearly stated and documented.
Protecting your work is easy today, arguably too easy. It's protected from the moment you hit the save key on your computer, touch your pencil to paper, brush to canvas, etc. Works are protected from the moment of their fixation in a tangible medium of protection. This means that notes taken during a lecture enjoy the full force of federal copyright law for the life of the author plus 70 years. Given the purpose of copyright, to encourage the growth of knowledge, it hardly makes sense to provide a period of exclusive use backed up by the full force of the U.S. legal system to insure the optimal production of lecture notes. But that's another issue.
If you want to go the extra mile to make sure you can enforce your rights in federal court, you'll need to register your automatic copyright with the Copyright Office. You can learn all you need to know to register copyrights at the Copyright Office's website. It's cheap and fast, but it's only necessary if you think it likely that you would sue someone to stop an infringement of your rights.