The Explorer internship gives you the opportunity to try out both the PM and Dev roles. You meet with a recruiter 3 times (minimum) throughout your internship. They will ask you how you are feeling about your internship, and which role you might see yourself filling in the future.
If you find that PM suits you, there is an interview process that you will need to participate in. Someone usually emails all explorers about this at some point. You will either be given an offer or not at the end of this process.
If you find that Dev is more your cup of tea, just do your best during your internship! At the end of your internship, your recruiter will tell you whether or not you have received a return offer. If you receive a return offer and you accept, Microsoft will try to put you back on the same team next summer. If they cannot find a spot for you there, they will look at the next closest team.
If you decide that you would like to join a different team, you will need to find a contact on that team and interview with them. Depending on how far (organizationally) away that team is, the interview process may differ. Cold emailing people honestly works relatively well - everyone wants to talk to and help out interns!