To be congruent two triangles must be the same shape and size. However they can share a side, and as long as they are otherwise identical, the triangles are still congruent. In the figure below, the triangle LQR is congruent to PQR even though they share the side QR.
Note that the triangles not only share a common side, but one is the mirror image of the other.
See Reflected congruent triangles.
One way to think about triangle congruence is to imagine they are made of cardboard. They are congruent if you can slide them around, rotate them, and flip them over in various ways so they make a pile where they exactly fit over each other.
In the figure above, if the triangles were cardboard, you could take LQP, flip it over and it would fit exactly over PQR.