It takes your body around 1 hour to process 1 Unit of Alcohol, so that's about half a pint of beer or one 25 ml shot or 2/3 of a 125 ml glass of wine. That number is for people with a healthy liver. For others, it may take longer.
Drinking 2 pints will take your body 4 hours to process the alcohol, increased or decreased by the amount of food in your digestive system and the health state of your liver. Usually on a good night out the Units will stack up, keeping you over the legal limit to drink and drive far far longer. In other words, if you have 10 pints, you can't drive for about 19-20 hours.
1 drink which equals to 1 shot, 1 beer, or 1 glass of wine will stay in your system for 8 hours. for every drink another 8 hours is added. This isn't exact because people digest things differently. This is only an average. It ranges from 6 to 10 hours.