It depends on the context. You might casually speak of resizing a web image by zooming into it on your browser so you can see more of the detail. In that case, the image is not changed at all - only your view of it. When professionals speak of resizing, they are often talking about changing the number of pixels in an image. As an example, a pro may have shot an image at 24 MB. That is much too big to use on a web page. It takes too long to load or download, and too much room to archive.
In such a case, image editing software is used to reduce the number of pixels. Photoshop works well for this purpose, but there are dozens of other applications that can do it. The menu command would be Resize Image or something similar. The popup requester would have fields to enter the new horizontal and vertical sizes in pixels. There would also be a switch for Aspect Ratio. When it is on, if you change the horizontal pixel count the vertical count is automatically calculated and adjusted so that the image does not change its shape. When you change the vertical count, the horizontal count is automatically adjusted. With the aspect ratio switch off, the picture can be squashed or stretched in either direction, but this is almost always a bad idea.
What is the ideal size for an image?
The general rule is that it should not look blurry or have visible pixels at the size and distance it is viewed. A pro needs to know the common image size requirements for web pages, HD or 4K video, newspapers or magazines. And there will be times they will have a special challenge that requires some research.