Both but 2 is by far far far far the superior product in every way and the 1st is not necessary -at all- to play it. Because you won't know who anyone is anyway unless you read the books. Note: The glossary/character section of your journal is your friend, and remember the central conciet of the game is that the main character has Amnesia. Which means, if the game doesn't explain something, assume Geralt is just as confused as you but he's excellent at going along with shit.
The only thing from the first game you need to know is how it sets up the second: you end the first game rescuing the local king from an assasin who looks suspiciously very much like a witcher, and as a result you and your smoking hot sorceress lady friend land cush jobs in his court (actually she was already his advisor, you just get to be his new bodyguard.)
Also in the first game the events involve heavily the Scoia'tel, an elf/dwarf/non human paramilitary/terrorist group fighting for non human dominance/equality (things are never black and white in The Witcher). Events referenced in the game are, by in large, events from the BOOKS (which are in polish) not the first game, with the exception of the life/death of Adda (which happens in the first game depending on your actions and has no real effect on the events)
Effectively, the last game only influences, slightly, the events of the intro chapter that teaches you the controls. And like the last game, The Witcher 2 doesn't really pick up until -after- the intro chapter, namely once you reach the first village you start getting neck deep in quests n shit.
Just remember: If you don't know something, Geralt probably doesn't either - for instance a womans name comes up alot (Yennifer) and he doesn't know who the fuck she is, just that she was important.