Before your draft or near the end of the IDF ulpan (Michve Alon) you will be required to fill out a "manilla". Manilla is a questionnaire asking you to rank different units in order of your preference. It is called a manilla because it is sent in the mail in a manilla envelope. If you do not attend a gibush and pass then the manilla and the IDF's needs will determine which unit you will be placed.
If you pass the Hebrew test at the tzav rishon then you will be notified before the draft where you will be serving. If you need to attend the IDF ulpan then upon completion of the course you will be taken to the Bakoom (induction office). There you will meet a Katzin Miun (Selection Officer). He/she will notify you where you are going to serve. If you are not given the unit that you desire it is still possible to switch. Many have tried different tactics from pleading for mercy to throwing over tables or even going to jail until given the unit they desire. Some have been successful and some not. It is also possible to switch out of a unit that you are already serving in however it is much easier to switch if you are still at the Bakoom and have not yet started basic training.
Remember why you are coming to serve in the IDF – Every position is honorable, the purpose is to help the security of Israel.