WHAT IS THE LAW?
For the most part, pilots must follow the same rules as the average citizen. These rules are mostly what you would expect: don't steal, don't litter, don't assault people, don't run naked through the streets, and so on. Common sense applies. Usually, a subsection of civil law written specifically for pilots and their unique circumstances details how to handle any offenses.
EAOS, AEU, and League have an open system of laws which citizens have full access to, though of course it often requires a lawyer to interpret them properly. The Fringe still have many laws on the book from their days as a parliamentary republic; however, citizens are understood to be under martial law and loyalty is enforced. In other words, Fringe citizens should not presume to have the right to free speech, and lack many of what one might be inclined to call "basic rights."
The Mutuality is even more different and subscribes to the Free Port Doctrine, a large document that enforces free trade and the right for all ships to seek safe harbor. While violations of the Free Port Doctrine are taken very seriously, the Mutuality lacks most of the morality-based laws that other alliances still have on the books.
VIOLATING THE LAW
Violating the law can have a number of possible effects. Minor offenses are usually met with fines, generally small by pilot standards. More serious offenses will usually result in a stay in jail (more on this below). However, because alliances have an interest in keeping pilots free, active, and making money, they will usually arrange for any stay behind bars to be relatively short. Only in very exceptional circumstances will a government press charges against its own pilots and take them to court, and usually these circumstances will also result in the pilots losing their licenses.
Fines and stays in jail should not be interpreted as punishments from the staff. You, via your character, will have made the decision to violate the law, and the world in which your character lives will react in a sensible manner. Disobedience should be a conscious choice as part of your character's arc, and dealing with (or trying to avoid) the resulting punishment should become part of his or her story. Getting thrown in jail does not necessarily mean that the staff want you to stop what you're doing (although your actions may begin to not make sense for a pilot -- more on this below). You can roleplay through bad times too!
THE NATURE OF PRISON
By interalliance agreement, pilots experience their jail time at Corbin Memorial Prison, a high-security prison on the airless moon Dure. However, because the facility is also easily accessed by free pilots, any pilots (or ex-pilots) who are sentenced to serve time in prison will be moved to another high-security facility within their alliance. Otherwise, pilots are only in jail at Dure until their court date, or, far more often, until their government decides to spring them.
Remember, jail is not a punishment from the staff! To this end, the jail environment is fairly immersive and certainly more than just a single cell that you wait within. Corbin Memorial Prison enjoys long hours of prisoner free time, during which inmates can roam the facility, exercise, eat delicious gruel, shower, and receive visitors. The jail even allows its inmates to send and receive mail (after it has been screened, of course). If your character ever ends up in jail, please feel free to leave your cell and explore the facility.
Pilots are often regarded in popular culture as something between ultra-rich celebrities and roguish scoundrels, and the media loves to see them in trouble. While the media, legally, cannot lie (except for the tabloids), they are not obliged to show any pilot in a favorable light. If you've done something wrong, particularly if you're in a position of leadership, expect it to receive some attention.
Also, remember that pilots must be psychologically fit to serve their alliance. If you randomly punch a technician in the face, get sent to jail, then randomly punch a guard in the face, your government may begin to wonder just what is wrong with you and whether you can still serve them. This may result in a visit from a psychologist or, if the behavior persists, there may be no choice but to revoke your character's pilot license. (Note: You, as the player, will be talked to by the staff before this happens.) Also, it's important to remain consistent with your profile -- people are fond of submitting profiles describing themselves as kind and peace-loving, then they go on to try to knock out the nearest NPC. This sort of inconsistency may require you to revise your character concept.
Again, though, violations of the law should be a conscious decision on the part of you, as the player, in order to tell your character's story. The punishment that your character receives will then be a sensible response by the world that he or she inhabits. This should not be confused with the staff punishing you, the player.
If your character has gotten into trouble and you aren't sure what to do, please use the SUPPORT command to speak with the staff.