when I design a PCB, I can not drag a component,after dragging, it will automatically return to its original position
Please give your Operating System, Kicad version and dragging method.
For OS & Kicad version, open Kicad > Help > About Kicad > Copy version info. (top LH corner) then directly paste into a thread.
Dragging does not work if the destination location is occupied and dragging would cause a DRC violation. You can overrule this by depressing the [Ctrl] key during the drag.