1 + Nominative singular (один рік)
2,3,4, + Nominative plural (два роки)
5 + Genetive plural (шість років)
But as Vinnfred pointed out, it depends on the last digit of the number, not the number itself, so e.g. 24 follows the rule #2, not #3 (24 роки, not 24 років)
Oh right man! And I've been going around confusing people :) The last word, yes! Sorry :)
What about this Ukrainian apostrophe? I can't hear any difference in its pronunciation.
The apostrophe means you separate "я" from "п", so "я" sounds like "йа". The resulting sound is "пйа" Without the apostrophe it means that "п" gets softened, and "я" sounds like "а". The resulting sound is - "пьа".
For people who are familiar with the Spanish "ñ", it's easier to explain using this sound :) ня -> ña, н'я -> nya