Differences between inductor and electromagnet?
Is it because in the case of electromagnets, the resisitance is high
  due to more number of turns?


6 turns or 60 turns will likely have quite a low resistance unless you are using really microscopically thin copper or a big diameter of solenoid or electromagnet but yes, the more DC resistance it has the better a DC supply rail survives without going into current limit.


  Also, when we disconnect the inductor from the DC source, its magnetic
  field collapses and a high surge of current is produced.


No, a surge of voltage is produced in a failing attempt (by the inductor) to maintain the current that was previously flowing before it was disconnected.


  But why this diode is not used when we make an electromagnet?


A diode is used for an electromagnet AND a solenoid if the circuit is being controlled by a semiconductor i.e. a transistor. Sometimes it's omitted because a secondary winding can clamp the kick-back voltage to a level that protects the transistor.

If the coil isn't controlled with a transistor a diode may be used to prevent arcing across the switching contact and it can also restrict EMI from interfering with other electronics. In the main, a diode is used.


  Even on YouTube, all the electromagnet DIY projects are made without
  the diode. They just simply connect and disconnect their
  electromagnets without getting any minor shocks. Why is this?


You can get a small electric shock but it's usually barely noticeable in a lot of experiments - as you disconnect the contacting wires, the spark forms at the gap and is usually over in microseconds. 

However, don't rely on YouTube for setting good examples because there are types of solenoids that can give quite a sizable jolt if not handled correctly.