First, everything @mattdm says in his answer is basically true. There is no secret formula that makes the golden ratio or the spirals that can be derived from redacting a series of golden rectangles into squares aesthetically pleasing. Claiming the golden ratio will give the most aesthetically pleasing compositions is like saying the only form of verse that can reveal the meaning of life is a limerick.
But like all compositional "rules", it helps to understand how they work if you're going to try and use them.
The "Fibonacci spiral" obtained from dividing a rectangle is derived from starting with a golden rectangle and redacting it into a square. The remainder left over is another, smaller, rectangle with the same aspect ratio. You can continue to redact each rectangle into a square in an endless regression. If the square is always created to the outside edge of the smaller rectangle with respect to the next larger one, drawing an arc through the corners of the squares will produce an approximate Fibonacci spiral. Like most pure mathematical expressions, their resemblance to things in the physical work is usually approximate. But in this case, even the two mathematical expressions are approximate to each other.
Approximate and true golden spirals. The green spiral is made from quarter-circles tangent to the interior of each square, while the red spiral is a Golden Spiral, a special type of logarithmic spiral. Overlapping portions appear yellow. The length of the side of one square divided by that of the next smaller square is the golden ratio.
(Image and description licensed under CC BY-SA 3.0)
The golden ratio can be most simply defined as the solution to x-1=1/x. It is often represented in mathematics by the lowercase Greek letter phi (φ). φ is an irrational number approximately equal to 1.618. It turns out that φ has a tremendous number of interesting mathematical properties and can be expressed in a variety of different mathematical expressions that, at first glance, are seemingly unrelated. The mathematical applications are far reaching, especially in geometry where figures with 5 sides are involved. Another of the ways φ can be expressed is (1 + √5)/2.
The Fibonacci sequence is a simple mathematical sequence that was described by Leonardo Fibonacci (c. 1170– c. 1250). The sequence begins with 0, 1. Each Fibonacci number thereafter is the sum of its two immediate predecessors (0+1 = 1, 1+1 = 2, 1+2 = 3, 2+3 = 5, etc., ad infinitum). The first 21 numbers in the sequence are 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, and 6765.
Since the numbers 2,3, and 5 are part of the Fibonacci sequence, and since limericks are poetic verse based on the numbers 2,3, and 5 (five lines with an AABBA rhyming structure and a 33223 beats per line structure), then the following is a Fibonacci poem about Fibonacci sequences:
Zero, one! One, two, three! Five and eight!
Then thirteen, twenty-one! At this rate
The man's sequence for years
Has kept math students studying late.
From "The Omnificent English Dictionary In Limerick Form"
The relationship of φ to Fibonacci sequence, as we have seen above, is approximate. It turns out that dividing a number in the Fibonacci sequence by its immediate predecessor will give the approximate value of φ. As we divide each number in the sequence by the preceding number, these approximations are alternately lower and higher than φ, and converge on φ as the Fibonacci numbers increase. Dividing the 25,001 number in the Fibonacci sequence by the 25,000 number yields a result that is accurate for φ out to at least 10,000 significant digits!
When we try to apply the golden ratio to photography, however, we immediately start bumping up against that word approximately. A golden rectangle has an aspect ratio of φ, or ≈1.618:1. Most cameras produce images with a lower aspect ratio. 35mm and full frame cameras and most APS-C cameras have a 1.5:1 aspect ratio. Four-Thirds, µ4/3, and most cameras with even smaller sensors have a 1.33:1 aspect ratio.
About the most we can do is to redact the square for one, two, or three steps in the sequence before the shapes of the remaining rectangles start to get more than a little off. If you shoot to trim a little off the top or bottom to match a golden rectangle, you might can make it to five or six squares before it gets too messy. You can start from either the left or right, then go from either the top or bottom, then alternate to the right or left (opposite of step one) and bottom or top (opposite of step two), etc. Place elements in the scene along the edges (lines in the scene) of the squares or at their corners (points) in the scene. Of course any visible element of the scene is probably larger than a single point, with the possible exception of a star. So once again, you have to approximate.
We cropped this image to approximate the golden ratio of φ and drew in lines that reduced the first five rectangles to squares.
Notice that we were able to place elements of the scene along each of these five successive compositional lines. Sometimes the element is shorter than the compositional line, sometimes vice-versa. But each line has a corresponding element in the scene approximately along at least part of its length. We also have a very strong diagonal and a strong curve traversing the largest square that also lead the viewer's eye to the locomotive that occupies the fifth redactive square. If one were to draw the tangential arcs in each square to create a near-Fibonacci spiral, the fifth arc would cross the nose of the locomotive from lower right to upper left, the sixth would arc above the train and then the seventh and all successive ones would fall in the space occupied by the freight cars being pulled by the locomotive.
And honestly, even though this image has elements that match up to lines from five golden rectangles, I think the strength of the composition is probably more due to the two diagonal lines and curves that intersect at the face of the locomotive.