Make it clear at the end of the first date
The first and last impressions of any encounter are much more memorable than a lot of the time in-between, so if you're not feeling it, it's important to signal that to him at the end of the date. If he goes home thinking you weren't too excited at the end of the date, he's not going to have his hopes up as much as if you gave him a full-on hug and said "that was so great! We need to do something like this again soon!"
The big strength of signalling how you feel at the end of the first date is so that you can leverage the full range of in-person body language to make it clear that you're politely declining his advance. Generally, just being polite and neutral is the way to go. Don't go for any hugs, maybe even keep things at a handshake. Brief and polite smiles, the usual farewells like "it was good to hang out." or "i'll text you", and refusing to make further concrete plans are all good. Ending with something short and neutral like "have a good day" instead of "talk to you soon!" makes it clearer that you're not interested in being any closer than acquaintances.
It may not work. Some guys may optimistically try to ignore those signals, - but that's their cross to bear, not yours. If you've done your best to set expectations early, it makes the actual turn-down a lot easier for everyone.
After the first date
Since you're past the first date and need to turn him down more succinctly, the most important thing is to keep it short. Don't get into any long conversations, or beat around the bush - once he brings up a second date, just be clear and say something like "you seem nice, but I don't think we quite fit." or "maybe we'd work better as friends".
Since this date was set up through a mutual friend, you can tell that person why you were not interested. This isn't a substitute for turning the guy down politely, but it will allow you to give your unfiltered feedback (about how he wasn't funny, or nerdy enough, or whatever turned you off) to the mutual friend, who will then relay it to the guy in a friendly way.
While your post didn't mention it, I still think it's important to emphasize that turning him down explicitly is the way to go. It can be tempting for some people to simply avoid the matter entirely, and just not talk to the other person again. Usually this is done out of fear of hurting their feelings, or decision paralysis, or procrastination - but this is the absolute worst thing you can do. Rejection is never pleasant, but if he gets no reply whatsoever it will feel like he must have done something terribly wrong to merit being alienated.
No matter what medium you turn him down in, the most important thing is to keep it short, but polite. You don't need to tell him why you're not interested, because that will very likely sound too much like personal criticism. If he asks for feedback, you can give it. But generally you don't need to give reasons why you don't want to date someone.