Screen size is the length of the diagonal of the visible display area, measured from one corner to the opposite corner and usually given in inches. A 27-inch monitor is 27 inches from corner to corner, and its width is less than that.
The diagonal alone does not give the shape of a screen. The aspect ratio, written as width:height such as 16:9, sets how wide the screen is, so two screens with the same diagonal can have different widths, heights, and areas.