All Macs are equipped with an Ethernet card. You can use this to connect your Mac to any network, including modems, hubs, switches and routers. You'll need an UTP Ethernet cable. If you only want a small network between two computers, you'll probably need a 'cross over' cable. Are there more computers in the Network and you connect to a hub or switch, you'll need a 'straight' cable. Just go to a computer store and tell them what you want, they'll know what to sell you.
What should I do to connect my Mac to an existing network:
Mac- to- Mac, Mac-to-Windows, Mac-to-Linux/Unix
Connect your Mac with an UTP cable. Go to System Preferences => Network.
Choose 'Build-in Ethernet'.

Choose 'Apply now'.
Now go to System Preferences => Sharing and edit your Firewall.

You can access the Network by going to the Menu "Go" and "Connect to server":
and choose 'Browse': 
Now use the password the Network Administrator gave you. Otherwise you can log on as 'Guest':
After logging on, you see the volumes you can access in the Sidebar at 'SHARED':

Now let's show how your Mac can be a server: Linux/Unix-to-Mac, Mac-to-Mac
First you'll need to give your Mac permission. At default, your Mac is closed to others. So you'll need to go to System Preferences => Sharing and Choose 'Personal File Sharing':
TIP
Public access to any other folder
At default, only the Public folder is accessible to others.
In case you want to change that, select a folder and choose 'Info' from the Archive Menu. Now change the access details at 'Ownership & Permissions:

A FireWire Network: use a second Mac as an external hard drive
You can connect two Macs through a FireWire cable. One of them boots normally, and the other only functions as an external hard disc.
Shut down both computers. Connect the FireWire cable. Boot ups the first computer normally. After boot up, start up the second computer (the one who's going to function like a hard disc) with the T key .
This Mac will not boot normally, but will only function as an external FireWire hard disc. We call this 'Boot up in Target-mode'.
Now you can transfer data from one Mac to another.
What should I do to connect my Mac to an existing network:
Mac- to- Mac, Mac-to-Windows, Mac-to-Linux/Unix
Connect your Mac with an UTP cable. Go to System Preferences => Network.
Choose 'Build-in Ethernet'.

Choose 'Apply now'.
Now go to System Preferences => Sharing and edit your Firewall.

You can access the Network by going to the Menu "Go" and "Connect to server":
and choose 'Browse': 
Now use the password the Network Administrator gave you. Otherwise you can log on as 'Guest':
After logging on, you see the volumes you can access in the Sidebar at 'SHARED':

Now let's show how your Mac can be a server: Linux/Unix-to-Mac, Mac-to-Mac
First you'll need to give your Mac permission. At default, your Mac is closed to others. So you'll need to go to System Preferences => Sharing and Choose 'Personal File Sharing':

Select Options. In case you want to let Linux and Windows user connect, select 'Share files and folders using SMB':

Note: You can tell your Network Administrator your Mac communicates with the SMB or 'Samba' protocol.
Sharing files.
Clicking on the 'Home' icon in the Sidebar brings you to your Home Folder immediately. Your Home Folder is private; only you can read its contents. Only the 'Public' folder is accessible by others in a network:

They only are allowed to drop stuff into the 'Drop Box'.
TIP
Public access to any other folder
At default, only the Public folder is accessible to others.
In case you want to change that, select a folder and choose 'Info' from the Archive Menu. Now change the access details at 'Ownership & Permissions:

A FireWire Network: use a second Mac as an external hard drive
You can connect two Macs through a FireWire cable. One of them boots normally, and the other only functions as an external hard disc.
Shut down both computers. Connect the FireWire cable. Boot ups the first computer normally. After boot up, start up the second computer (the one who's going to function like a hard disc) with the T key .
This Mac will not boot normally, but will only function as an external FireWire hard disc. We call this 'Boot up in Target-mode'.
Now you can transfer data from one Mac to another.