Use Case, Class, Sequence, Collaboration, State chart, Activity, Component and Deployment diagrams are used in UML. Describe each of the eight (8) main diagrams used in UML.Use Case diagramUse cases are used in requirements elicitation and system analysis stages in a project. It uses to represent the functionality of the system. Use cases focus on the behavior of the system in an external point of view. It creates a visible result for an actor to describe a function provided by the system. In the definition of the boundary of the system, it identifies actors and use cases results. It differntiates the tasks accomplished by the system and the tasks accomplished by the environment. The actors are outside the boundary of the system, and the use cases are resided inside the boundary of the system (Bruegge & Butoit, 2004).
The use case diagram below describe the functionality of a simple watch system. the WatchUser actor may either consult the time on her watch with the ReadTime or SetTime use cases. However, only the WatchRepairPerson actor can change the battery of the watch (with the ChangeBattery use case):
Class diagramClass diagram is used to describe the structure of the system. Class is abstract, specify the common structure and behavior of a set of object. An object is an instance of a class that is created, modified and destroyed during the execution of the system. Class diagram describe the system in terms of objects, class, attributes, operations and their association (Bruegge & Butoit, 2004).
The class diagram below describe the elements of all the watches of the SimpleWatch class. These watch objects all have an association to an object of the PushButton class, an object of the Display class, an object of the Time class and an object of the Battery class. The numbers on the ends of associations denote the number of links each SimpleWatch object can have with an object of a given class:
Sequence diagramThe sequence diagram also called interaction diagrams. It is used to formalize the dynamic behavior of the system and to visualize the communication between objects. It is useful for identifying additional objects that participate in the use cases. It also represents the interactions that take place among objects. It focuses on the messages exchanged between objects as a result of external events created by actors (Bruegge & Butoit, 2004).
The below sequence diagram for the SetTime use case of the SimpleWatch system. The left most column is the WatchUser actor who initates the use case. Labeled arrows represent stimuli that an actor or an object sends to other objects:
Collaboration diagramCollaboration diagram describes the same information as sequence diagram. It represents the sequence of messages by numbering the interactions. It removes the geometrical constraints on the objects and results in a more compact diagram. Then the sequence of message becomes more difficult to follow (Bruegge & Butoit, 2004).
The collaboration diagram is equivalent to the sequence diagram in the above:
State chart diagramState chart diagram describes the dynamic behavior of an individual object in a number of states and transitions between these states. A state represents a particular set of values for an object. When a state is given, a transition will represents a future state of the object can move to and the conditions associated with the change of state (Bruegge & Butoit, 2004).
The state chart below for the SimpleWatch represents different information than the sequence diagram:
Activity diagramActivity diagram describes the behavior of a system in term of activities. Activities are elements that represent the execution of a set of operations. The complete of these operations are trigger a transition to another activity. Activity diagram is like the flowchart diagrams that can be used to represent control flow (Bruegge & Butoit, 2004).
The activity diagram below represent the behavior in terms of activities and their precedence constraints. The completion of an activity triggers an output transition, which in turn may initiate another activity:
Component diagramComponent diagram depicts how components are linked together to form larger components and or software systems (Bruegge & Butoit, 2004).
The component diagram bellow is the WebServer component and its containing classes in it:
Deployment diagramDeployment diagram is used to describe the relationship among run-time components and hardware nodes. Components are self-contained entities that provide services to other components or actors. Nodes are represented by boxes containing component icons in the Deployment diagram (Bruegge & Butoit, 2004).
The deployment diagram below represent the allocation of components to different nodes and the dependencies among components. The Web browsers on PCs and Macs can access a WebServer that provides information from a Database:

Reference- Bruegge, B. and Butoit, A. H. (2004), Object-oriented software engineering: using uml, patterns, and java, Prentice Hall.