Answer:
The super-ego
Explanation:
According to Freudian theory, there are 3 personality structures:
So, your friend went out to drink even though he should've stayed in and studied (he followed his id), now that he's feeling guilt about it, he's thinking about what he did wrong, and it's the super-ego which is concerned with what's right and what's wrong and moral rules.
Thus, the super-ego is causing the guilt.