The cases are 100% real. People who are taking someone to small claims court (maximum damages $5000) can apply to have their case heard on 'Judge Judy' by going to the show's website and contacting the producers with the details. Both parties need to agree to have their case heard by Judy and to agree to the judgement she passes.
The show is filmed in a mock courtroom at a TV studio complex in Hollywood, and the audience tend to be made of any extras and volunteers who are available in the studio at the time. They don't tend to be the general public.
Byrd was Judge Judy's court bailiff for many years when she was a sitting judge in New York and, when she was given her own show, he resigned from his position to join her in the show.
Only once has a losing party failed to agree to the judgement laid down by Judge Judy and took it to a higher court to appeal, and won the case.
And, no, it's not possible for her to send someone to prison. If, in the course of the case, she receives testimony of a felony or misdeamour that has been committed, she can pass the details onto the relevant authorities, but she would be exceeding her jurisduction to act herself. If that was indeed the case, the episode would probably not be broadcase (for fear of prejuding any real criminal proceedings) until the case was settled.