Photoshop cannot create icons on its own, but there are plug-ins that can do it. Alternatively you may use a dedicated icon editor (such as the one from this web) to create icons from jpegs.
Be aware that jpeg is not the best format for icons, because it contain artefacts.
create icon
icon
how do i create .jpeg to .ico in photoshop