They are both correct! The one who prounces "year" to rhyme with "ear" is more 'standard' so, at this stage in your English studies, make more of an effort to imititate this teacher's pronunciation.
Personally, I find the other accent ("year" to rhyme with "her", "cup" more like "cook") very beautiful - my wife and her family speak with this accent! - but, as a foreigner, and a beginner, it's best at this stage to imitate the first one.