The judicial branch protects your rights through precedence. This is the legal theory that courts will follow the decisions of previous court rulings in more current rulings. While it is a legal theory, it is not set in stone. There are many examples of courts reversing prior precedence when societal discussions alter the way we view norms in society. So while precedence can protect your rights, it can also serve to hamper rights until society has furthered the discussion on an issue. The important part of the judicial system is that precedence is not binding.
The branch can also protect your rights by examining torts, which are civil wrongs. Courts can order restitution, or monetary payments, to a victim. This doesn't always make the original offense go away, but it is the court's way of trying to ensure people aren't harmed by the actions of others.
Another way it protects your rights is through the Rules of Evidence, which are the various rules on how court cases must proceed. These rules attempt to ensure the rights of both parties to the case are protected and a fair trial is observed.