First of all you need to unlock the bootloader then you need to install custom recovery like TWRP then you can boot into the custom recovery flash custom ROM..