JOINs fetch related data in a single database call.
The N+1 query problem occurs when an application makes one query to fetch a list of entities and then N additional queries to fetch related entities for each item. Using a JOIN, you can retrieve all the needed data in one query. For instance, loading all orders and their items in one go prevents multiple queries from being issued for each order.
Additional Notes
Why can using JOINs help prevent the N+1 query problem?