Distinguish between humor and wit. These two qualities are often viewed as a single unit, although it is not so. Sense of humor is the ability to find in every situation something funny and point it out to his companion. Wit is the ability to create that "something funny" and to put into verbal form. Of course, sometimes you meet people who possess both these qualities, but often have to settle for at least one of them. Some believe that a sense of humor and wit is a gift, not a skill that you can acquire at will.
Learn to abstract from himself. The ability to laugh at oneself is inherent to a few people. Often this is due to some inferiority complex, fear to expose themselves to ridicule, etc. as soon As you realize that there is nothing terrible, that the people, on the contrary, more will welcome a cheerful person, than a dork, to laugh at yourself you will be much easier.
Continuing practice. Try as often as possible to come up with funny situations and interesting replica when you have nothing to do. This seemingly futile exercise will allow you to react quickly to what is happening and finding witty expressions.
Engage in self-development. Expanding horizons is never a bad thing, especially if you are looking to impress colleagues and friends with his witty attacks. The more you know, the more you will have material to build intricate structures designed to amuse and give pleasure to your listeners.
Smile more, because without it even the most funny and original joke would lose all its charm. Try to look at all the positive sides and make fun of the possible unpleasant moments. The more you do it, the better over time you will get.