I usually say hello and smile when I sit down, but I don't force a conversation. If they want to talk, and I haven't put my headphones on yet, I'll chat with them for a little while.
If I don't really feel like talking to them (I just want to sleep/relax) but they won't stop, I usually excuse myself to the bathroom and make sure that my headphones are in before I get back.
On a flight last year from Toronto to LA, I sat next to an especially chatty guy with halitosis. That wasn't fun. No matter what I did, which included listening to my iPhone and watching movies on the personal seatback screen, he tried talking to me (including asking me if I'm enjoying the movie and if he should watch it too). I think he was just excited because it was rare for him to fly, and it was his first time to LA.