Me and my boyfriend both got tested for herpes after sleeping with each other. His test came back positive and mine came back negative. How?

This is very common. When one person in a couple has genital herpes due to type 2 herpes simplex virus (HSV2), It's transmitted less than once for every 100 episodes of unproteced vaginal sex, maybe only 1 in 1,000. Even lower for HSV1. So it's very common for one person to test positive (from a past relationship) and the other to be negative. Speak together with doctor about how to prevent future transmission.