Kodaira (小平市 Kodaira-shi) is a city in Tokyo Prefecture.
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.
Alternatively, you can take the Chūō Line from Shinjuku until Kokubunji Station, transfer to the Seibu-Tamako Line and ride this to Hagiyama Station. Then you can transfer to the Seibu-Haijima Line and travel one stop to Kodaira.