How can a character be made to appear witty, or funny? That is, the character amuses other characters, not the reader, who should ideally be impressed with the characters wit. The only way that I can think of is to have the character be able to make some good jokes, but that relies on the author being funny. What if I'm not funny, or just can't think of any good jokes at the time?
In addition to the points made in SF.'s answer, one can also express the act indirectly or express the effects of the wit without showing the wit itself.
Here are some examples:
(This might present Joe in an inappropriately negative light, but if said by someone who dislikes Joe or is excessively uptight about formal procedures the negativity would be reduced, possibly inverted.)
(Anyone who can make that punchline funny is probably fairly gifted.)
Obviously, there is a limit to how much one can express the humor indirectly. The effectiveness of the actual jokes could be improved by indications that those jokes are actually the weakest jokes the character tells ("I'm disappointed, Joe. I almost managed to keep myself from laughing on that one.") or by having another character tell the joke and explain that the witty character shared it and that the witty character told it much better.
I'm afraid then you're quite stuck.
Note as the author you have significant advantages:
Last but not least, gather a bunch of expressions with double meanings, have their innocent, literal meaning variants happen in the story, then have the smartass mention them in a way that arises blush.
The first issue you need to deal with is where you say "the character amuses other characters, not the reader". As Lauren Ipsum points out, what you're basically saying here is that you're going to tell the reader the character's amusing, rather than show it. A character is believable because the reader finds him believable, not because the other characters find him believable, so you're already falling at the first hurdle if you can't make the reader see him as witty. This should be your top priority.
The other issue is the idea that the author must be witty or funny to make a witty or funny character. Not so. Must an author be a cold-blooded murderer or a withdrawn, melancholic cowboy to write those characters? Of course not, any more than an actor must be like the character they're trying to portray. What an author must be is a good observer of other people, and that's the best advice I can give you in order to write as another character. Observe friends, family or even strangers who are funny and witty, and see what makes them funny and witty. Read biographies of funny people. What made them tick? Get inside that person's head, and try to think like them. Not just how they're funny and witty, but why are they funny and witty. Do they do it to hide their own inadequacies? To divert attention? To become the centre of attention? There's an old saying: often a true word spoken in jest, so perhaps it's done to mask how they really feel in a funny way.
As a side note, it's not just telling jokes that makes someone funny. It could be puns or word play, it could be the ability to poke fun at other people or even themselves, or even just the way an ordinary story is told. Being funny and witty takes on many different forms, so don't just think in terms of "jokes".
In addition to what others have said:
It's easy enough to buy a joke book or search the Internet for jokes. Then pick a few that you can fit into your story.
I read a book about how to be funny years ago -- not saying that I got A's in that class! -- where the writer said that an important trick is to be able to adapt jokes on the fly. You can often take a joke that was written in one context and just change some of the details around to fit it to the present context. Like, I read a joke once that involved telegrams. Well, no one sends telegrams any more. But then one day we were sitting around talking about email and I took a telegram story and just changed all the references from telegram to email.
(Of course you can't just blindly replace words. You can't necessarily just change "A beautiful young woman went to see a doctor ..." to "A beautiful young woman went to see a database engineering consultant ..." and have the story make any sense. Doctor jokes routinely hinge on the idea of the doctor behaving inappropriately, which is jarring and funny because we expect doctors to be very proper and reserved. But we expect database engineers to be crude, so there's no humor there.)
I mainly agree with most folks here, although I think that the old, old standby of "show, don't tell" applies. If you say that a guy is witty, at best the reader will think that whomever you've given the narrative voice to thinks the character is witty (which by the way can be useful - for instance, if you want to introduce a character who is a bit of a buffoon but who the narrator has a crush on or something, you can use that device to create some dramatic irony). If you have characters physically laughing at what a character is doing, at best you portray the idea that the other characters think this person is witty, or at least choose to laugh at their jokes. The worst case scenario in both cases is that the reader thinks you're trying too hard and puts down the book.
I like to think that I can write fairly funny prose but one thing I basically never do is have other characters laugh at it. Roll their eyes, yes. Sigh and tell them to get to the point, absolutely. For one thing, I like the irony that encompasses a joke not getting a laugh. For another, if someone really doesn't find the line funny, they get to sympathize with the not-laughing character. It's like a win-win for everyone.
I assume that you, like most writers, are one single individual with a limited experince of the world. You have never murdered anyone, you don't really remember how you felt as a child, and you don't score 160 in an IQ test, yet you write about murderers, children, or brilliant scientist.
It is, of course, impossible for you to know how these people think or feel. So how can you write about them?
You fake them.
Psychology has found that people can usually judge another person's intelligence pretty accurately just from seeing that person. They don't have the person perform an IQ test, they just look at cues like facial features and signals of education and expertise like dress style and accessories (glasses, laptop case), academic degrees, who that person associates with and how he interacts and moves.
It is generally assumed that intelligent persons are successful in all aspects of life, good looking, socially competent etc. Of course this is not true (or at least not in such a simple correlation), but that are the cues that we use to judge a person's intelligence. Wit, of course, is partly intelligence, partly social competence, and partly humor. So markers for intelligence will give a clue about wit also.
Movie creators use these markers and carefully select the dress, car, and furniture of their characters. Some movie characters appear intelligent on first impression, because of what they look like and where we first see them (e.g. the lab).
A German theatre director went even further. He wrote the character's IQ on their forehead.
Of course you cannot do this in a novel, but you can do something similar: just state that they are witty, or have one character say it about another. If you don't want to be so direct, equip your character with cues of wittiness: people laughing with him or her, and if you cannot show interaction, use the other cues I mentioned above.
But let's assume that you are a witty person yourself, and you don't have to fake your character's wit. There is a danger with this. Unlike intelligence, where we all can agreee that a person winning the nobel prize cannot be stupid, wit is a question of personal taste. What I will find intelligently funny, you might think inane. It is also a question of context, current emotional state, and (sub)culture. Since you cannot control who reads your book, you run the danger of your readers finding your witty character's wit rather crude. If you tell and don't show, this won't happen.
I always say: Do not describe your characters. If the protagonist falls in love with that person, the reader will imagine that person to be beautiful after the model of his own taste. If you give the love interest a specific appearance, chances are that your reader finds that look unattractive and won't be able to follow your protagonist.
Do the same with all things that vary among your readers. Tell your readers of the effect that a character has, but
leave it up to the reader to imagine the kind of person that would cause such an effect.
First, you need to decide: what KIND of funny? Watch a bunch of comedy shows / movies / standups. Analyze them, and you'll find that there are MANY kinds of funny. Too many to list here, but examples are: dry, intellectual, self-deprecating, wry, wise-ass, idiot, childish, buffoon, crude, goofy, crazy, hostile, nerdy, gallows. You must pick ONE (or maybe two) of these for your funny character, and of course it must fit his/her other characteristics. Also, it must fit the other characters.
That leads me to my second point: you'll need at least one straight man (who could be a woman). The straight man can also be funny, but in an opposite manner. He is funny as a receiver. His reactions make the jokester funny. A stupid, corny joke instantly becomes funnier if the hard-boiled, no-nonsense guy responds with, "Haha. You're a laugh a minute."
Which leads to my third point: people are funniest in combination. That's why stand-up comedy is so hard, and why so many stand-ups have multiple personas in their act. That's why sit-coms have a variety of characters. Most jokes need a foil, a target. A couple of idiots acting stupid isn't very funny. A couple of idiots acting stupid, but one of them thinks he's smart, is funnier. Those idiots inadvertently embarrassing their dignified, cultured, and intelligent companion is very funny (or could be), especially if the uptight guy is forced by circumstances to depend on those clods.