There is no one-size-fits-all answer to this question, as the optimal fan configuration will vary depending on the specific case and components involved. In general, however, it is typically best to position case fans so that they are blowing cool air into the case, rather than pulling hot air out. For example, if you have a front intake fan and a rear exhaust fan, the front fan should be positioned so that it is blowing cool air into the main chamber, while the rear fan should be positioned so that it is pulling hot air out of the main chamber.
Another consideration is the specific components that you are looking to cool. If you have a graphics card that tends to run hot, for example, you may want to position a fan so that it is blowing cool air directly onto the graphics card. Ultimately, the best way to figure out the optimal fan configuration for your specific case is to experiment and see what provides the best results.