You can take the AirTrain from JFK to Jamaica ($5) then switch to the Long Island Railroad from Jamaica to NY Penn Station ($3.25 to $7.25 depending on time/day) then switch to the NJ Transit train to Newark Airport ($15). This is probably your fastest option. Or there's a bus you can take from JFK to Port Authority or Grand Central ($15) and switch to the bus to Newark (also $15). Traffic may make this option take longer.
You can take the AirTrain