To start with Socket.IO I suggest you read first the example on the main page:
On the server side, read the “How to use” on the GitHub source page:
https://github.com/Automattic/socket.io
And on the client side:
https://github.com/Automattic/socket.io-client
Official tutorial
https://socket.io/get-started/chat