What's the difference between rainbow and regular spinning wheel?
The rainbow spinning pinwheel is usually controlled by the OS.
  The blue pinwheel is shown by an app to indicate loading.



  The spinning wait cursor (shown below) is also standard, but it is displayed automatically by the window server when an app can't handle all of the events it receives. In general, if an app does not respond for about 2 to 4 seconds, the spinning wait cursor appears. If the app continues to be unresponsive, users often react by force-quitting it.


Source: OS X Human Interface Guidelines: Use the Right Pointer for the Job

The blue pinwheel is sometimes called the JavaScript pinwheel as JavaScript in websites are one of the primary ways a user will see this cursor, for cross-platform reasons, as in OS X a 'waiting' cursor is generally not recommended.