A Fischer structure is one way of depicting structures such as sugars or amino acids to quickly draw them and have a definite way of seeing stereochemistry on every carbon. The rule behind Fischer structures is that the highest oxidised atom should be at the top or as close as possible to the top. The following convention is used to turn tetrahedral carbons into a square environment:
This allows you to assign absolute configurations to every carbon atom.
When instead drawing the same structure as a ring like in your lower images, you just need to take care that every carbon has the same configuration. (Note that your drawing of β-D-fructose is wrong; it should be drawn with a very wavy line like in my image below, because of the constraints of Fischer projections.)
Once you have gotten there, you are free to rotate the ring around as much as you wish while retaining the absolute configuration at every stereocentre. Note especially, that a rotation of $180^\circ$ of my structure of β-D-fructose will lead to you one on the left. If you don’t believe me, print it out, turn the paper around and then nudge the forwards-pointing part of the ring downwards below the tetrahydrofuryl-oxygen.