The name says .jpg. The first bytes say what it is.
A file extension is just part of the name, and anyone can change it. Most formats start with a fixed run of bytes, a "magic number", that programs check instead. Drop any file here: nothing is uploaded, only its first bytes are read.
One PNG made in this tab, handed to your browser three times with a different type label, as a mislabelled download or upload would be. Each result below is measured now, not described.
A Word file, an ebook and an Android app all start "PK", because each one is a ZIP archive with agreed file names inside. To tell them apart, a program has to look past the first bytes.
The file extension (.jpg, .mp3, .docx) tells the OS which program to use. You can change the default program in OS settings.
The file extension is the suffix after the last dot in a filename (.jpg, .pdf, .mp3). It identifies the file format.
You need the right software for the file format. For example, .psd files need Photoshop or a compatible image editor.
A file contains actual data. A folder (directory) is a container that organizes files and other folders.
A file format is the specific way data is organized inside a file. Different formats have different capabilities, compression, and compatibility.