Very simple. If a smaller number is before a larger number, you subtract the smaller from the larger, like so:
I=1
V=5
IV=4
if not, you just add
VI=6
the hardest part is just memorizing what letter corresponds to what number, but It's easy for me so..