Yes, rabies is most definitely contagious.
The most common route of infection is from the bite of an infected animal, which introduces virus-laden saliva to the victim. It's also possible, though much less likely, to be exposed to infective saliva in the eyes, nose and mouth.
The CDC claims that a person-to-person transmission of the virus via bite is theoretically possible, but has not been documented:
...bite and non-bite exposures inflicted by infected humans could theoretically transmit rabies, but no such cases have been documented.
There has however been person-to-person transmission of the virus through organ transplants, also documented here.
In terms of avoiding spreading the disease, the routes of transmission suggest several clear methods:
- Avoiding contact with wild animals, or domestic animals in rabies endemic areas showing signs of infection, such as hydrophobia or aggressive behavior.
- Vaccinating animal populations to interrupt transmission of the virus within wildlife.
- Postexposure prophylaxis for people who have come in contact with a potentially infectious animal.
- Screening of organ donors for rabies.