coilpack, plug, injector, wiring or something much worse
Read the codes (make a note) and clear them to find out which cylinder, swap the coilpacks round and take for a gentle drive, check codes to see if misfire stays on the same cylinder or follows the coilpack. Do this again with sparkplugs until you determine, whether it is a plu & coil issue or whether you need to start looking at a new injector - which is a lot more costly in terms of parts & labour