I have used NSSets many times in my apps, but I have never created one myself.
When is it better to use an NSSet as opposed to an NSArray and why?
An array is used to access items by their index. Any item can be inserted into the array multiple times. Arrays mantain the order of their elements.
A set is used basically only to check if the item is in the collection or not. The items have no concept of order or indexing. You cannot have an item in a set twice.
If an array wants to check if it contains an element, it has to check all its items. Sets are designed to use faster algorithms.
You can imagine a set like a dictionary without values.
Note that array and set are not the only data structures. There are other, e.g. Queue, Stack, Heap, Fibonacci's Heap. I would recommend reading a book about algorithms and data structures.
See wikipedia for more information.