It depends on how fast you can travel! It takes about one hundredth of a second for light to travel from the moon to the Earth. The Apollo missions took a few days to get to the moon, but new rockets can get there much faster, the record is eight and a half hours.
Space isn’t that far away. If the world were a beach ball then the atmosphere would be the thickness of a layer of paint on that beach ball, so it doesn’t take very long to get there. If you could drive straight up in a car it would only take 10min! We can’t do that though, and rockets take a while to get up to the speed needed, so it takes a few hours.