I just went trough this myself creating a Java server with Android client.
And this two links provided plenty of info!
a tip is to search for Java Socket server.
to learn JavaSocket
I use http://docs.oracle.com/javase/tutorial/networking/sockets/clientServer.html
And to pull it all togheter with Android client and ServerSide.
http://myandroidsolutions.blogspot.se/2012/07/android-tcp-connection-tutorial.html
Don't forgett to open ports in ur firewall to get the communication to work! to add Internet support in ur Android Manifest!