Make sure you are walking your dog on a leash and try to avoid areas with bikes while you are working on this behavior. Working with your dog to pay close attention to you on a walk and getting him used to these weird "animals" on two wheels can do wonders to correct this habit and improve your dog's behavior in general. Be prepared to change your routine for a while, and move slowly. To get started, you are going to need to have basic commands and leash walking under your belt.
Once you're ready, have these items on hand to help you along: A three to four-foot leash, Your dog's favorite treats, A clicker, A friend or family member with a bike, Plenty of patience. There are several ways to work with your dog to not chase bikes.
Start working in a quiet and controlled area, this could be your yard or driveway, put your dog on a leash and bring him outside to the spot. When he turns his attention to the bike, ask him to refocus on you, you can use 'watch me' or 'look' commands, as soon as he looks from the bike to you, give him a treat. Keep practicing with your friend, have him ride by faster and closer until your dog begins to look at you as soon as he sees the bike.