It can take anywhere between 6 hours and 2 days! Usually it takes around 2 days, but recently there have been a few docking within 6 hours.
It all depends on physics and speeds of vehicles. The Soyuz launches into space and gets the astronauts into orbit, and then it totally depends on where the ISS is in the sky, in order for the Soyuz to align with it with the correct speeds. The speeds and positions have to match extremely precisely; luckily all of those calculations are worked out by the team on the ground way in advance 🙂