why it doesn't get hard ?

me and my guy is the second time we had sex. the first time he almost didn't get hard at all and was impossible to have sex probably like 1 hour later it got hard. the second time it needes like half our to get hard, then as soon as he puts it up. it goes off again. Why? What do i do?