You will need a visa if your connecting flights is coming after eight hours of your arrival at the airport.
The nationals from 48 countries listed as GCC nationals which would not need a pre-arranged visa. For the nationals from these countries can get a visa on arrival at the airport.
Also Read: Best Things to Do & Places to Visit in Dubai for Free