the one in the wrong: the guilty party a court rules against, and from there the wicked person whose whole life stands condemned, always the opposite of the righteous (צַדִּיק).
At its core this word points to a courtroom. The basic picture is two parties before a judge: one is declared in the right and one is declared in the wrong, and the rasha is the loser, the guilty party, the one the verdict goes against. The clearest cases are legal. Deuteronomy 25:1 tells judges to "acquit the righteous and condemn the rasha"; Solomon asks God to do the same from heaven; the prophets denounce the bribe that lets a judge "acquit the rasha." Many scholars now treat this legal sense as the root from which the rest grows.
From the courtroom the word reaches out into the whole of life. If God is the judge of all the earth, then to live against what he requires is to stand as the guilty party before him, whatever a human court says. So the rasha becomes the standard label for the wicked person: the one who turns from God's ways, scorns instruction, and whose life runs opposite to the righteous. Psalms and Proverbs return to this contrast hundreds of times, setting the rasha and the tsaddiq side by side as if they are the only two kinds of person there are.
Because it names a person rather than an act, the word often pictures the rasha doing things to other people: lying in wait for the innocent, oppressing the poor, plotting against the upright. In the Psalms the wicked are frequently the speaker's enemies, a social type built out of images of predators and hunters. These are not a separate word so much as the same person seen from the angle of the harm he does.
The wisdom books then test the whole picture. Job protests that God "destroys both the blameless and the rasha" alike, and Qohelet observes a righteous man perishing in his righteousness while a rasha lives long in his wrongdoing. They keep the category but deny that present good fortune reliably tells you who is who. The abstract noun for the quality or conduct itself is a separate word (רֶשַׁע, H7562).