Read the memory management rules. 9 short paragraphs, you can read in about a minute. They clearly explain the difference between the two.
As to why you should use one or the other, it depends on the platform.
On the iPhone, which is under powered and low on memory, you would generally prefer the former unless you are going to be forced to use autorelease (for example, if you are going to return it from a method whose name does not begin with “alloc” or “new” or contains “copy”). If you are going to autorelease it, then use the second form. Otherwise, use the first form and release it explicitly yourself in the method.
On the Mac, which has more than enough power and memory to make the autorelease pool a trivial detail (in all but the most pathelogical cases), you can use the second form for any case. Normally if you are going to keep it around you would assign it to a copy/retain property so you would not need to retain it. The exception is in an init method, where you can't use setters, or in setters you are implementing manually, and thus need to assign to the ivar yourself. In those cases you would often use the former.
But all of that is just style/premature optimization (not necessarily bad in this case, since in is a low level noise kind of optimization that profiling will not detect and that will just generally slow you app down by a little). The important thing is to read the rules and follow what they say, and if you do that, you can use either form as you please.