If this all reasonably happens in a steady state, so the air pressure inside the house is constant, then any flow of air out of the window has to be matched by an equal flow in somewhere else, so either way the room is going to cool down: a parcel of cool outside air will replace an equal mass of warm inside air, and the direction of the fan doesn't matter.
The fan is going to set up a current of air through the house regardless.
If there is a heat source inside the house, then a parcel of inside air will still carry the heat from the source to the outside regardless of direction, as long as the source sits in the current of air set up by the fan, but there is a crucial difference in how long the heat from that source remains in the air in the house:
If the house has two open windows and a heat source is near one, clearly a given amount of heat will stay in the house longer if the air current is towards the window that's farther away, as a parcel of air has to travel a longer distance before it's outside; so the heat has more time to dissipate, heating the air that's not directly in the current.
So the house would reasonably be cooler if the fan was pointed at the window closest the heat source.
So if you're sitting by a window with your PC, you're reasonably the largest heat source in the room, and the fan should pointed towards the window closest to you so your heat escapes the house quickly. More effective than pointing the fan out the window would be positioning it so you are in between the fan and the window, since the air current will have a cooling effect on your skin.
If the fan is the heat source, then yes, point it at the closest window. But as a general rule, point it towards the window closest to the heat source.