The Schengen countries are Austria, Belgium, Denmark, Finland, France, Germany, Iceland, Italy, Greece, Luxembourg, Netherlands, Norway, Portugal, Spain and Sweden.
If you are travelling Schengen to Schengen, you will not be subject to immigration, but you will be subject to customs. However, you may still have an ID requirement for check-in or mandated by the destination country.
If you are travelling Schengen to non-Schengen or vice-versa, directly, then you will be subject to immigration and customs at the destination.
If you are travelling Schengen to non-Schengen with a change in a Schengen country, then you will clear outgoing immigration (if there is any) at the transfer point, and incoming immigration and customs at the destination.
If you are travelling non-Schengen to Schengen with a change in a Schengen country, then you will clear incoming immigration and hand luggage customs at the transfer point, and checked luggage customs at the destination.
If you are travelling non-Schengen to non-Schengen with a change in a Schengen country, then, assuming the airport allows it and you remain airside, you will clear both customs and immigration at the destination.
So, for IST-CDG-JFK, the last option will apply.