First things first: get the game, slot it into your Nintendo DS, boot it up, and start your turnabout trials.
As for the gameplay itself, Phoenix Wright is roughly half courtroom problem-solving and half detective work. You'll gather clues, apply a bit of deductive reasoning, and crack open the secrets people are hiding. The deeper mechanics come into play later, like the scientific investigation in case 5 of the first game and the final three cases of Apollo Justice, plus special abilities such as Phoenix's Magatama and Apollo's bracelet for uncovering hidden truths.
Overall it plays out like a visual novel. You move around, listen to conversations, question people, and piece together the story of each case. The game itself usually explains, sometimes bluntly and sometimes subtly, what you need to do to move forward.
To "beat" it, simply solve every case. Alternatively, if you own the original Gyakuten Saiban games for Game Boy Advance, you can insert them into the DS's Slot 2 to unlock case-jumping in the later titles.