A Jester is a role that wins when they are eliminated, or voted out. If they survive to endgame or are killed in any other way, they lose. Even though technically they might be eliminated in the implicit process of scum endgaming a Town, they invariably just lose when the game gets to that point to avoid that kind of rules lawyering. Similarly, if the Jester is the only role in the game stopping the Town from winning, the Town simply wins and the Jester loses.
The original variant of Jester ended the game when it won (leading to things like BBB's Gambit). However, this almost always ended in short games where the Jester won. Thus, once the Jester is eliminated the game usually continues. Jesters who are eliminated are considered joint winners alongside whichever main faction wins the game.
Jester is held in profound distaste partly because it is easy to win with (any village idiot can get eliminated Day 1) and partly because even in the best case it punishes Town for eliminating someone who is not of their alignment.
Jesters have been seen with a few hindering modifiers attached to them, such as Even-Day (the Jester only wins if it is eliminated on an even-numbered Day) or a post restriction. In other games, players are told that there is a Jester in the game. This does not usually change that the Jester eventually wins.
Based on all of the above, Jester is generally considered a bastard role.
The opposite of a Jester is an Unjester.
Use and Power
Jester balances like a guaranteed miselimination. To balance this, sometimes when Jesters die the moderator enacts some pro-Town act to counterbalance this; for instance, the player who hammers a Jester wins a One-Shot Vig kill.
Most people will probably still tell you to simply not use Jesters though.