Put a link to the other language pages on each page and let the user choose the language. How do you do it automatically, so that each user sees the site in his preferred language? You could use cookies, but the user would still have to make the choice at least once. How do you do it without the user having to choose? You don't. You could use the country the user's IP address is from, but that means that an American tourist in Italy would always get your Italian page - and if he doesn't understand Italian, he'll never go back to your site.
It is possible to create multiple language files, containing arrays with the text you want translated. Something like this: $lang['home'] = 'Welcome on our website']; And then use $_GET parameters to set the desired language.