They can't interact (sort of - explained in more detail below) because they run on two different places. Server Side Scripts - eg, PHP, will run on the server and complete running before data is sent to the user's PC.
Client Side scripts (eg, Javascript) START running when the user finishes loading the page data.
So, in short, the PHP finishes executing before the JS even starts to execute - hence they can't really interact.
How you make them interact is through some trickery and calls inside the JS to request aadditional data from the server - so at that point they will still run individually, but you can get them to talk via additional calls made in the page.
Using this approach, even though they are being executed totally independantly of one another, they are able to exchange information via data (such as JSON objects) and give the impression that they are working together, although they are doing it in totally different places.
Non Technical Analogy
To use a completely non IT analogy which will hopefully make it clearer, lets say that server side scripts are an army base. Client Side scripts are units deployed into another country. They are all there to accomplish a particular task, but they work totally independantly of one another. Now, JSON is like a phone call between them. The deployed units can make a call to the base, ask for further instructions and then execute them, but as far as the base is concerned, they have no idea what is happening until the deployed units call home again - so they can SORT-OF work together, but do so individually and without knowing what the other is really doing.