How does scaling an image/box work?

How is an image or box is scaled from let say 608x608 to 720x1280 or vice versa? I am unable to visualize it. What is the method used to do this?

To increase image size you need to create and add data. Here are examples of some options, but the key idea is interpolation

Going down in image size you need to remove information. You can either just omit it altogether or try to blend the new neighbors to lessen the scar.

Not sure I understand what scaling a box means to you, but it could be just math. Maybe the box was computed as a fraction of a 32x32 grid cell, but you need to convert to pixels to draw onto a full size image. That requires multiplication by image size / grid cell size ratio