Assuming you are starting from scratch, it typically takes adults anywhere from a few hours to a couple weeks to learn how to ride a bike. This obviously depends on factors such as previous experience with balance sports, level of coordination, natural athleticism, etc. However, with patience and practice, most people can learn the basic skills needed for riding a bike within a few days or weeks.
If you have never ridden a bike before, the best way to start is by getting comfortable with the basics. First, get yourself a bicycle that is the right size and adjust the seat so that your feet can reach the pedals comfortably. Once you have your bike set up correctly, practice getting on and off of it until you feel confident doing so. Then, spend some time practicing balancing on your bike while stationary. Once you feel like you've got the hang of balancing, it's time to start pedaling!
Start by pedaling slowly at first until you get used to the feeling of moving forward while keeping your balance. If you need help keeping your balance while pedaling, try holding onto something like a fence or another person at first. Once you're feeling more confident in your abilities, start picking up speed and eventually let go of whatever you were using for support. Before long, you'll be cruising around on two wheels!