Installing New T8 Ballast; need wiring diagram
The new ballast should've come with a wiring diagram. It might even be printed on the ballast itself.

In general I think most (all?) T8 ballasts have blue wires going to one end and red wires going to the other. Are you replacing a T8 ballast or something else? T12s are wired differently so make sure to follow the new ballast's wiring if you are replacing an older one.