Just search for 'ajax multiplayer', 'turn based multiplayer' or something.
Depending on how good your programming knowledge is, it's pretty simple.
Very simplified Example for a chess game:
After a player finishes his turn he sends the move he made to the server. Then you would set the player state to "listen".
The second player (or the player who does "listen") does ask every X seconds if the other player has finished his turn. If yes, get his turn he made and set the state of the second player to "playing".
Of course you would need some anti cheating measures and you need to validate the move you received.
It would be better if WebSocket would support UDP or we had something like webRTC, CU-RTC .