If one for instance server is running on windows can client be on Ubuntu?
The TCP/IP suite is the TCP/IP suite. It does not matter if that runs on Ubuntu, Windows or any other OS. The data on the network is in a well described format, regardless of the OS or even the CPU's Endianness.
Can I just write the code in eclipse compile and run it or I need first to perform some configuration in terminal window for Linux?
To use TCP over IP (or UDP over IP, or ICMP) you will need to configure the network the regular way. There is nothing special of different between you have learned how to do that in windows or in a Linux distribution.
I want to understand and learn how to send data wireless form one PC to another without using ROUTER in a middle if it's possible?
That is called an ad-hoc wireless network. Your wireless cards needs to support that.
And with router in a middle then it suppose to be simpler I think
I assume that with router you mean a wireless access point?
Because a normal router does not do wireless.
(Disclaimer: many devices are a combination of (Fibre|ADSL-)modem, router and wireless access point. However these are still separate function and you really should understand how things work.)
I suggest that you start with learning the basic way how TCP/IP works and then look up how wireless works. If you still have problems after that come back and ask a specific single question.
This is a nice place to start.