How to select rows which are mapped to a junction table in a many to many relationship?
Assuming that locations and professionals also have their PK columns as location_id and professional_id, respectively, and location_professional uses those columns to link the two entities:

SELECT loc.*
    FROM location_professional AS lp
    JOIN locations AS loc  ON lp.location_id = loc.location_id
    WHERE lp.professional_id = 4;


In your simple example, there is no need to also JOIN professionals AS p ON ....  In a typical case, that would also be needed.