Attributions are a lot like citations in that they help to maintain the history of an item including who originally developed it and when. Attributions differ from citations in that they also describe exactly how the resource can be shared or customized based on the provisions of the Creative Commons license.
Creative Commons licenses allow you to reuse, revise, remix, redistribute, or retain works created by others for free. You can use CC-licensed materials as long as you follow the license conditions; one of which is always that you give attribution.
There are six different Creative Commons licenses specifying how the material may be used. You'll know the work is covered by a Creative Commons license when the work has one of these licenses assigned to it:
The Creative Commons wiki entitled, "Best practices for attribution" tells us that a good way to remember the elements required in an attribution, is to use the acronym TASL, which stands for Title, Author, Source, License.
Title - What is the name of the material?
If a title was provided for the material, include it. Sometimes a title is not provided; in that case, don't worry about it.
Author - Who owns the material?
Name the author or authors of the material in question. Sometimes, the licensor may want you to give credit to some other entity, like a company or pseudonym. In rare cases, the licensor may not want to be attributed at all. In all of these cases, just do what they request.
Source - Where can I find it?
Since you somehow accessed the material, you know where to find it. Provide the source of the material so others can, too. Since we live in the age of the Internet, this is usually a URL or hyperlink where the material resides.
License - How can I use it?
You are obviously using the material for free thanks to the CC license, so make note of it. Don't just say the material is Creative Commons, because that says nothing about how the material can actually be used. Remember that there are six different CC licenses; which one is the material under? Name and provide a link to it, eg. http://creativecommons.org/licenses/by/4.0/ for CC BY.
→ If the licensor included a license notice with more information, include that as well.
Lastly, is there anything else I should know before I use it?
When you accessed the material originally did it come with any copyright notices; a notice that refers to the disclaimer of warranties; or a notice of previous modifications? Because that kind of legal mumbo jumbo is actually pretty important to potential users of the material. So best practice is to just retain all of that stuff by copying and pasting such notices into your attribution. Don't make it anymore complicated than it is -- just pass on any info you think is important.
→ Regarding modifications: Don't forget to note if you modified the work yourself. If you are at the point where you are creating and licensing derivative works, see Marking your work with a CC license.