There's an example in the
Java Tutorial Custom Networking Chapter and another example
here. Creating threads has some overhead, so it is common to create a number of threads in a pool and reuse them.
As for passing messages to other clients (sounds like a chat program), the server has to keep track of all the clients and distribute incoming messges to each of them.
The most basic technique in programming is to split your big problem into smaller ones. Create simple proof-of-concept programs, like two peers that connect to each other and
exchange messages, or a server that exchanges messages between two clients, then try to introduce multithreading to service more clients. Don't get bogged down in protocols or fancy functionality. Get something working. Once you get the basics down, think about building upon the basics to create more complex systems.