Common Scripting Pitfalls
Coroutines in C#
In C#, a coroutine must return a value of type IEnumerator, as mentioned in the documentation. However, if you return the similarly-named IEnumerable, the coroutine won't work, and it won't return an error either!
Floating point variables and methods
A common thing to do in scripting is to Lerp, or linearlly interpolate between two values. Unity has built in functions to lerp variables of type float, Vector3, Color, Material, and Quaternion, to name a few. The key thing to get sorted out is that all of the methods that operate on these different classes are within the class itself, except for float. To lerp a float, or to do other common operations dealing with floating point numbers, see the Mathf class. It contains Lerp, Min, Max, Abs, Sin, and all sorts of handy math functions. See the wiki's own Mathfx (short for Mathf eXtended) for even more handy math functions.
My script hangs/beachballs Unity!
The most likely cause of this is that your script enters some loop and does not give control back to the Unity engine at all. You probably are forgetting to put a yield statement in your loop. See the Unity documentation on coroutines and the yield statement.
Also if you hit a null reference exception, the first time it happens will take a while showing a beach ball, as the exception is also caught by Apple's crash reporter, which spends some time creating a stack trace of Unity. On slower machines this may give the impressions that Unity is hanging.
There are more possible causes of Unity hangs that should be elaborated on later.
My scripts seem to be frame rate dependent!
If your script performs some incremental operation that should happen over a certain period of time, rather than a certain number of graphical updates, (This is most likely what you do not want!) you need to multiply your specific operation by Time.deltaTime.
For example, in C#: