So, I think you might want to start off by defining what a component diagram is. Do a google search and find some sample component diagrams, and find a good definition. Then share with us on this thread what you found out.
Read the relevant section of the UML 2.x specification. It makes it quite clear what the various elements are for, the constraints that exist upon them, and the associations and attributes that characterise them