Why a network refuses a picture for its shape
Most networks take a picture of any shape and crop it themselves in the feed; a few refuse it before it is published. Instagram is the one people meet: a feed picture has to be between 4:5 and 1.91:1, so a tall 9:16 phone screenshot comes back with an error rather than a crop. Threads takes up to 10:1 in either direction and Telegram up to 20:1, with the further rule that the width and height together may not exceed 10,000 pixels. Everything else in the table above takes any ratio, and a refusal there is about size or format instead, which the image compressor handles.
The ratio is simply width divided by height. 1080 × 1350 is 0.8, which is 4:5, Instagram's tallest allowed portrait. 1080 × 566 is about 1.91, its widest landscape. A square is 1. The checker works the number out from the picture's real pixels after applying the orientation a phone stores in the file, so a photo that is wide in the file but upright on your screen is measured the way a viewer sees it. The tolerance the validator allows (0.005 on Instagram) is built in, so a picture that is a pixel off an exact 4:5 is not turned away.
How to fix a picture that is the wrong shape
There are two honest fixes. Crop it, which loses the edges, or add bars, which keeps the whole picture but needs an editor; this tool only does the first, from the centre, to the nearest ratio the network takes. It rounds inward so the result is never a pixel outside the limit, shows you the area it keeps with a thirds grid, and saves a full-resolution JPEG you can download. If the subject is not in the middle, crop in your own editor and use the table to confirm the result.
Nothing is uploaded: the picture is read and cut in your browser. The verdict is also sent, as a width and a height, to the validator Preflight runs before a scheduled post goes out, so the answer here is the one the composer would give. The same rules, with file sizes and formats, are in every network's limits, and the Instagram image size guide goes through the pixel dimensions.