I begin to learn category theory. The following three definitions are provided.
Definition 1. Two morphisms $f\colon a \to b$ and $g\colon c \to d$ are the same if and only if $a = c$ and $c = d$.
Definition 2. A diagram is a collection of objects and morphisms from a category.
Definition 3. A diagram is called commutative, if any composable sequence of morphisms with the same endpoints (of a sequence) results in the same composite.
Then, as the endpoints of sequences are the same, the sources and the targets of the composites are the same, so are all diagrams commutative? I suspect at least one definition is not correct, or I don't understand some parts of them.
The first definition doesn't make sense. Given two objects in a category, there can be many distinct morphisms from one to the other. To answer your main question: no, not every diagram is commutative. For example, in the category of sets, a diagram could look like this:
In this example, you have three sets $X,Y,Z$, as well as functions $f:X\to Y$, $g:Y \to Z$, and $h:X \to Z$. Commutativity of the diagram means that $h = g\circ f$. This is certainly not the case if you take specific functions $f,g$ and an arbitrary $h$ (write down explicit examples).