Audio players such as iTunes provide you with the ability to import into your library all audio files in a given directory. Typically, you specify the directory, and the program provides you with a list of all MP3 files found. Instead of listing the names of the files, which might be something like '21 Let It Be.mp3', you will see the Artist, Title, and Album for the given song. This information is embedded into the MP3 file itself in the ID3 tags.
MP3 (Moving Picture Experts Group-1 Audio Layer 3) refers to the format used to store audio data. You can open and read an mp3 file, but most of the contents will appear as gibberish if viewed as text. As MP3 started to become a standard for storing audio data, it became clear that being able to include some textual information in an mp3 file, for example the artist of a song, would be useful. ID3 tags were proposed for this purpose. The first version of ID3 stored metadata about the file in the last few bytes. The recent version of ID3 (ID3v2) stores the metadata at the beginning of the file.
The ID3 standard describes how the metadata will appear in the file. It specifies the tags that can be present, for example:
You could build your own library to extract the ID3 tags from MP3 files. Fortunately, there are several libraries available that will do this for you. jAudiotagger is one example. The jAudiotagger documentation provides a clear example of how to use the library to extract Artist, Album, Title, and other information: