I have two flight tickets. The first one is from Najaf to Dubai by flydubai. The other is from Dubai to Seoul by Korean air. Having 4 hours transit time to the next connecting flight from T2 to T1, and I carry only my hand baggage. What steps should I take in order to board Korean air? Should I go outside the airport and get a visa?
You don't need to leave the airside international transit area to change terminals at DXB, even on separate tickets.
The process is relatively straightforward, though the airport website does not explain it at all:
If you do have checked baggage, when you arrive, go to the Marhaba desk and they will arrange to have your checked baggage transferred to your onward flight. They do charge a fee for this service.
After that, or if you haven't got checked baggage, follow the Connections signs to the Connections desk, where you will arrange to use airside shuttle bus. Take the bus to the other terminal, then follow the Connections signs again to go through security. After you get through security you will find a transfer desk where you can pick up your onward boarding pass if necessary.
If you get lost or confused at any stage, seek out airport staff and they can help you.