Code mouse drag in 3D space

I am using OpenGL to drag a 3D object in 3D space.
Since I am totally new in OpenGL, I do not understand what other people said about mouse dragging. In fact I need a sample code + explanation, just explanation is not enough for me(unless it is simple and detailed enough).
I read other forums too, but I still do not understand.

Such as these forums, I do not understand at all…

My problem is How to do as written??

Thank you. I need this urgently for my assignment! Help will be truly appreciated.

I am using Microsoft visual studio and C++ to code.