You need to try to rank up to Z to get out of prison. There are also quests to do. You need money to rank up.