Does infamous 2 continue where infamous 1 left off

Yes. inFamous 2 picks up directly from the ending of the first game, with Cole arriving in New Marais and the consequences of the Beast's approach still hanging over the story.

Your karma carries forward as well, which is the mechanical expression of that continuity. Choices made in the original shape what the second game treats as your established character, and the story branches accordingly rather than resetting you to neutral.

If you are coming to the sequel first, it is playable but you will miss a fair amount. The opening assumes you know who Kessler was and what happened at the Ray Sphere, and those beats land much harder in order.