Most popular database management systems are relational systems, and are usually referred to as Relational Database Management Systems (RDBMS). What this means is that their databases can contain multiple tables, some (or all) of which are related to each other.
When two or more tables contain related data, they are said to have a relationship.
Relationships are something you design. They don't happen by accident. You actually design your database in a way that determines which tables will have a relationship.
How Does This Work?
The following screenshots demonstrate the data involved in the above relationship.