A SOQL relationship query is one SELECT statement that also reads fields from records linked to it by a lookup or master-detail field. Think of it as walking along the lookup: up from a contact to its account, or down from an account to every contact under it, without leaving the query.
If you write Apex, build an LWC data source or answer “show me each account with its contacts”, this is how you get related data in one round trip instead of a query per record. We ran every example below in our developer org on API 67.0, so you will be able to pick the right direction, find the relationship name for any object and read the results in Apex.