To convert Arabic numeral (Western numeral i.e. everyday numbers) you have to separate number into thousands, hundreds, tens and units. With Conventional Roman numerals you can express numbers from 1 to 3999. There are other alternative forms where you can express numbers greater than 3999.
Splitting 2018 we have: 2000 => MM, 10 => X, 8 => VIII. We have to concatenate corresponding roman numerals from thousands to units i.e. MM, X, VIII. So the final result is MMXVIII