You take your bags through customs when you arrive at your destination. You collect your bags there and go through customs on your way out of the airport.
When you check in at JFK, they will usually check the bags through to the final destination (I’m assuming Naples Italy). The sticky tag the check in counter people put on your bags will say NAP if that is the case. Except for your carry on. Your carry on will be inspected when you go through security to board your plane. Please be sure your carry on is within regulated size. I hate standing in line with people who think they can repack at the counter.
Without seeing your itinerary, I can’t really give you any better info than this.
(a diploma in Travel and Tourism and literally have flown around the world and my hubby travels for a job)
Don’t panic about the luggage making it. There is NOTHING you can do about that. It will be delivered when it arrives at the airlines cost. It happens more than you think and they know how to deal with it. Pack a spare set in your carry on if you’re worried.