From downtown Tokyo, make your way to the Seibu-Shinjuku Line (JR's Yamanote Line intersects it among others.) From Takadanobaba Station (or Seibu-Shinjuku station), take an express train west towards Kodaira. Your trip will be significantly longer if you choose a local train. An express takes around 20 to 25 minutes from Takadanobaba station to Kodaira station.