INNER JOIN returns only rows that match in both tables. LEFT JOIN returns all rows from the left table and fills missing matches from the right side with NULLs.
SELECT u.id, p.id FROM users u LEFT JOIN posts p ON p.user_id = u.id;