What aspect ratio is and how to keep it
Aspect ratio is the proportional relationship between a rectangle's width and height, written as two numbers like 16:9. It describes shape, not size, so a 16:9 image is the same shape whether it is a thumbnail or a cinema screen. Common ratios include 16:9 (modern video and TVs), 4:3 (older screens and many photos), 1:1 (square, used on some social feeds) and 21:9 (ultrawide). The tool above resizes while keeping the ratio, so you scale without distortion.
Resizing without stretching. To keep an image undistorted, both dimensions must change by the same factor. If you know the target width, the height is width ÷ ratio; fixing one dimension and letting the other follow is how you avoid the squashed or stretched look that comes from setting both independently. This is exactly what "lock aspect ratio" does in editing software.
Cropping versus fitting. When content of one ratio has to go into a frame of another, you either crop (fill the frame and lose the edges) or fit (show everything with bars around it). Neither is wrong; it depends whether losing edges or showing bars matters more. Knowing the ratios of your source and target tells you how much you will lose either way.