On this page of the game guide to Borderlands 2 you will find a detailed description of the side mission titled Showdown. You can begin this quest in the Lynchwood after the completion of the side missions named 3:10 to Kaboom and Breaking the Bank.
1) Bounty Board
2) Sheriff office
It's time to fight the Sheriff of Lynchwood himself. Accept the mission  and head to where the fight will take place , in the northern part of the map. After you get there, the Sheriff's minions will appear. You will be shot at from the ground as well as roofs of the nearby buildings. It's worth to back out a bit and eliminate the enemies from a safe distance.
With all the Marshals killed, the Sheriff himself will attack you. He'll be at the roof of a building for some time, so just wait in a safe spot for him to come down to you. You can once again retreat to a safe place and eliminate the Sheriff by using a scoped weapon.
In order to gain additional experience, you would have to kill the Sheriff with a pistol and avoid shooting his Deputy shown in the above screenshot. After the fight, return to the Board  to end the mission.