Recently, I've been learning sockets but I'm having trouble understanding the select() fuction. I want some decent kind of explanation.

Also, when programming sockets in windows, whats the best way to check a socket for incoming data, will select() be able to help me with that? Or could someone show me some nice code to demonstrate a method, thanks, bye.