As you are on the same airline, your bags will be tagged all the way through to SFO when you check-in.
However, US Government rules require you to collect your bags in your first point of entry into the US, and carry them yourself through customs. Thus you will need to collect your bags in JFK after going through immigration and take them through customs. Once you're through customs there will be a place to re-drop them (without a need to actually "check-in" as such as they are already tagged to SFO).
From there, you bags will be transferred onto the US domestic connecting flights, so you will not need to collect them again until your final destination, SFO.