The best and cheapest way from Athens airport to Piraeus, where all the ferries go from, is the E96 bus. It departs every 15 minutes from airport arrivals, direct to the ferry quay. €3.50 (The Metro is interesting but you have to change at Monastiraki)
At the moment you have no other choice other than an expensive taxi ride because the usually excellent Metro stops before the airport due to the construction of new stations. So the buses are packed, be prepared to stand for the entire journey, take plenty of water and don't be shy about loading your bags on top of others. Also, you need to buy your tickets at nearby kiosks, the drivers don't take money and you could be fined.
The bus from airport to Piraeus is now the X96 and the fare is now €5. There is a board near the baggage collection area which tells you the time of the next bus. The bus stop is well sign posted, turn right out of the airport and walk about 100m along the pavement. You have to buy your ticket before boarding the bus from the little booth, and don't forget to validate it in the machine on the bus.