I'm new to elctrical engineering and want to do a diy project so yeah(plz help)
Indeed you will find a lot on line, at least 4000 hits wanting to sell you something, and a very few offering useful information.The internet is a good place to start. If you ask the same question about MP3 players on any search engine, you will get all the information you need. To find out how a headphone jack works, I suggest that you get one, with the matching plug, and first make some continuity measurements and then pull it apart.