Upvote:1
You do not need a visa in order to transit Incheon airport, as long as your connection is less than 24 hours. However as a Pakistan citizen you will NOT be allowed exit the international transit area of the airport.
Your only option if you wish to exit the airport would be to obtain a tourist visa in advance. There are no options for obtaining one one arrival in South Korea.