Rotten is an adjective that primarily means something has decayed or gone bad, especially organic matter like food.
But in slang usage, rotten can also mean:
1. Very bad or unpleasant (That's a rotten thing to say!)
2. Feeling unwell (I feel rotten today)
3. Corrupt or dishonest (The system is rotten to the core)
4. In British slang, it can mean drunk (He got absolutely rotten last night)