The restaurants along the harbor near the train station serve consistently mediocre food to the hordes of tourists arriving from and departing for Italy. You won't starve at any of these places, but you can do better. If, however, you are pressed for time, try To Konaki, across from the station; it serves dependably good food. (Unfortunately, for most of the summer, To Konaki moves shop to the beach at Rio.) If you want an ouzo before dinner or a sweet afterward, head for any of the cafes on the main square, Plateia Yioryiou. There are several old-fashioned tavernas along Ayiou Nikolaou, including the Majestic and Nikolaras. If you visit the kastro, you might have a meal at Krini, 57 Pandokratoros, which is usually open for lunch and dinner, has its own garden, and is popular with locals and Greek tourists.
One place I think of fondly is Trikoyia, 46 Otho and Amalias (no phone), a hole-in-the-wall taverna that serves excellent fresh fish and octopus. Chops and one or two other meat dishes are usually available as well. It's a 15-minute walk along the harbor from the main port.
Next door at 48 Otho and Amalias (the number is not posted on the building) is Pharos Fish Taverna (tel. 2610/336-500), with equally fresh fish. There are usually lots of locals eating here -- always a good sign. Head inside first and choose your fish; if you arrive and sit at a table, the waiter will probably ignore you, thinking that you're waiting for friends. If these places are too crowded, you'll find lots of other seafood tavernas on the harbor front, including Dinos at 102 Otho and Amalias and Apameno a few doors along at 107.