What is the best way on Ubuntu to hide my computer from network monitoring tools(network sniffer)?
Obviously the best way is to disconnect it.
When that is not an option, second best is to deny all incoming connections using DROP.
iptables -I INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT iptables -p INPUT DROP
This way all incoming attempts to connect to your computer fails. Connections initiated by your computer works. Some special protocols do not, for example you'll encounter problems with UDP. By dropping all incoming connections, active attacker from another network can't find your computer, except if you specifically open connection to attackers computer.
In LAN your computer is still broadcasting ARP packets. You can't prevent that, if you want it working connection.
It's a bit hard in general, if you talk about on Ethernet level for example, you can hide your existence with not responding the ARP requests or don't answer, but then you can't use network either :) You need to "advertise" yourself otherwise networking won't work. Sure, you can hide some other things at least which can provide more "attacking surface" for others. You can use firewall, so others won't see your services, you may run on your computer, you can be careful avahi not advertise your presence, and so on. But I think it's hard to answer "in general".
If you are communicating on the Ethernet or wireless you are open to sniffing. At the very least your computer will announce its presence when it gets or sets an IP address.
You could try masquerading as another computer on the network, but that will make things difficult for you and the other computer. Your traffic would still be open to sniffing.
Encrypting your traffic will make it more difficult to determine what traffic you are sending to. But the endpoints will still be visible.