Food in Cape Town is generally of high quality. The wines are much celebrated, but the surrounding region is also a major fruit producer, and the Karoo lamb is widely regarded. Seafood caught locally is superlative, but ironically much of it goes internationally (e.g., tuna for sushi) because of the prices that can be achieved. Ask about the local linefish -- yellowtail, cape salmon, kingklip, kabeljou and others are great eating. Oysters in season are also exceptional, farmed and wild from Knysna or wild flown in from Namibia.
As one of the main tourist spots is the V&A waterfront, you will find a broad range of restaurants, but they are often crowded and expensive. Another highlight is the area around Long Street with its many cafés and restaurants (frequented by a multi-ethnic clientèle), while the trendy area of De Waterkant between Bo Kaap and Green Point above Somerset Road also boasts good food and a great vibe. Dine with supermodels and other beautiful people in Camps Bay, which has many hip eateries and nightspots overlooking the beach along Victoria Road.
Further afield, Hout Bay on the west side of the Cape Peninsula is very good for fresh crayfish (lobsters - they have become quite expensive, around R300, though). Kalk Bay on the east side of the peninsula offers a big variety of fresh fish; do check out The Brass Bell. The restaurants in nearby Simon's Town are also good.
Do not neglect the Cape Winelands for food if you have a car. In Stellenbosch, Spier has several restaurants, including the fun, afro-chic Moyo, and many wine estates offer food of different types and quality. The village of Franschhoek is the culinary navel of the wine region, with Le Quartier Francais a perennial five-star winner, but only one of many excellent restaurants. In the Constantia Valley, Constantia Uitsig has three great restaurants, The River Cafe, La Colombe and the Constantia Uitsig Restaurant, upmarket, but worth it.
NB: Make sure you know what the price is before you order rare delicacies in restaurants as there have been a few rare but high-profile cases of heinous overcharging where the price is not on the menu, particularly for perlemoen (abalone) and crayfish (similar to lobster).