It is because you used "when" as a table name. "WHEN" is a reserved word and MySQL spat it out.
A JOIN is what is used to create a link between multiple tables.
So if we have the following 2 tables -
USER_TBL
user_id
username
password
USER_PROFILES
user_id
profile
if we want to query for the related data from the 2 tables we could use something like -
SELECT *
FROM USER_TBL, USER_PROFILES
WHERE USER_TBL.user_id=USER_PROFILES.user_id
this would show us the user_id,username,password,user_id1 (coz we already got it once) and profile as a row for each user.
This is only a very simple example of a JOIN. No doubt you will come across far more complex examples as you get going. It is easier to explain them when you have a practical requirement.
EDIT:
OOPS! I was a bit slow there