My boyfriends penis has been hurting and his semen has blood in it?

Several possible. Most likely your boyfriend may have an genito-urinary infection (urethra/prostate/bladder) or passed a 'jagged-type' kidney stone through the urethra. Another possiblity I have seen: penile trauma or penile 'fracture' causing pain/blood. I recommend he get seen by primary care to get a diagnosis. Hope he is better soon!
He needs to be seen! It's not normal to have penis pain and blood in the semen. He should see a qualified urologist as soon as possible to be checked.