Drag is a built-in function in Bitsbox. The code you put inside the drag function only runs when someone is dragging their finger (or cursor) on the screen.
Before the drag function is called, the global variables x and y are set to the current location of the user's finger.
This program draws a stamp wherever you drag your finger. Note the use of the x and y variables.