なんて has a lot of meanings, depending on the context. It can be used to put an emphasis on the preceding word/sentence (a large range of feelings; positive or negative), it can add a derogatory tone, it can be used in a self-deprecating/humbling way, etc.
なんか is very similar, but it can be only used with nouns. You've probably heard that one a lot as well. Sometimes in colloquial speech, it can be used as a "filler word", similar to how "like" is used in English.
Those two expressions are grouped with/compared to など, which is the exemplification marker. However, なんて/なんか are more informal and they put much more emphasis on contempt, belittling, etc.
If you search around the net, you'll find tons of similar topics like this one and quite a few "learners sites" explaining this, but from my experience it's better to take them with a grain of salt.
Without context, trying to figure out「なんて言うと思った」would be guesswork. Check the context and see if you can figure out what kind of emotion the speaker is trying to express.
You'll get a better feel of it with continuous exposure, just keep an eye out on how and when it's used. Context is key.