As far as IP, TCP, UDP and ICMP are concerned, the first question is whether other computers can see your computer. This happens when a computer is connected to the Internet via a cable/DSL modem without the use of a residential gateway/firewall. If a computer is Internet visible, other computers can launch attacks against it directly. With a default (unpatched) installation of Windows XP, it will only take 3 minutes for the computer to be compromised after it is connected to the Internet directly!
This means the first line of defense is to hide your computer from other computers, by default. A residential gateway will do that. Once a residential gateway is installed, then all the computers on the Internet can only see the router directly. By default, a residential gateway stops all incoming connection requests/datagrams. This stops most active incoming attack attempts.
You still have to be careful, however. A residential gateway is essentially just a miniature computer. As such, it can also be hacked. You should check firmware updates and keep your residential gateway up-to-date.
Furthermore, many residential gateways now offer the ability for WAN (wide area network) side remote administration. This feature is handy for those who want to manage a residential gateway remotely, but it also opens up a possibility for an intruder to gain access to your residential gateway.