Joins in BigQuery work as in any SQL database. JOIN ... ON keeps rows that match in both tables, and LEFT JOIN keeps every row from the first table with NULLs where nothing matches. Follow it with WHERE right.id IS NULL to find what's missing.
Give each table a short alias and use it on shared column names: FROM shop.orders AS o JOIN shop.customers AS c ON c.customer_id = o.customer_id. When the columns have the same name on both sides, USING (customer_id) is a shorter way to write it.
A table can join to itself. customers.referred_by holds the ID of the customer who referred them, so joining customers to customers gives each customer's referrer.