I'm learning CSS and I doubted the differences, well I'm designing a page with css but use margin-top and then change it to top and there was no change, then I do not know when to use u when using the other.
So for example I was designing a page to practice and use pure margin-left and margin-top, it would have been better to use the top and left to position
no, it is usually better to maintain margin than positioning, positioning can disagree on responsive, margin is more solid in that aspect, usually top and left is used with position when it is absolute or fixed.
You'd use margin, if you wanted to move a (block) element away from other elements in the document flow. That means it'd push the following elements away / further down. Be aware that vertical margins of adjacent elements collapse.
If you wanted the element to have no effect on the surrounding elements, you'd use positioning (abs., rel.) and the top, bottom, left and right settings.
With relative positioning, the element will still occupy its original space as when positioned statically. That's why nothing happens, if you just switch from static to relative position. From there, you may then shove it across the surrounding elements.
With absolute positioning, you completely remove the element from the (static) document flow, so it will free up the space it occupied. You may then position it freely - but relative to the next best non-statically positioned element wrapped around it. If there is none, it'll be anchored to the whole page.
My undеrstаnding is thаt mаrgin-top crеаtеs а mаrgin on thе еlеmеnt, аnd top sеts thе top еdgе of thе еlеmеnt bеlow thе top еdgе of thе contаining еlеmеnt аt thе offsеt. just rеplаcе top with mаrgin-top to sее thе diffеrеncе.