Your chances are much lower with a condom but not zero. Daily antiviral therapy is another way to greatly reduce the chances.
It's spread from skin to skin contact and friction to massage it in.
This happens either when an outbreak is present or when tbe virus shedds. Shedding happens 15-20% of days on average. The antiviral meds cut down outbreaks and viral shedding considerably.