The obvious first choice of local food to sample in Naples is pizza. After all, the pizza was reputedly invented in Naples, and in particular the pizza margherita was supposedly first created at the pizzeria 'Brandi' in 1889.
Second and third choices though are sfogliatelle and rum babàs.
Sfogliatelle are pastry shells filled with a mixture of ricotta, sugar, cinammon, and candied citrus fruit. They can be puff-pastry (sfogliatella riccia) or, not so good, shortcrust pastry (sfogliatella frolla).
Rum babàs you might have had before, but I bet not like the Neapolitan ones! These moist cakes are soaked in rum and often filled with cream.
Here is a moth-watering collection of confectionary including sfogliatelle and rum babàs on display in the old Spanish Quarter of Naples:
You can risk transporting these back to your hotel room or apartment for a solitary indulgence, or much preferably have them at a cafe in a piazza, like this one, the Gran Caffe Neapolis, on the Piazza San Domenico Maggiore:
You are very welcome to read my review of the Gran Caffe Neapolis here on TripAdvisor.