A wiseacre is someone who pretends to be wise, or when used sarcastically, a wise person. It can also be someone whose actions are funny but also annoying. Other related words are wisenheimer, wise guy, and wiseass.
As you can see by the ngram below, the use of wiseacre has dropped off in recent years in favor of these other alternatives.
Be careful using wiseass, as most still consider this a curse word, albeit one of the tamer curse words.