From the ferry station in Marina Grande you can take a ferry to Naples. If possible, choose the Hydrofoils. These are faster than regular boats. A ferry from Capri to Naples takes between 45 and 70 minutes and costs between € 12 and € 20 per person (one way). You can check the ferry timetable here.
TIP: The ferry station in Naples is located at Molo Beverello where the cruise ships dock. This is within walking distance of the city center.