One must recite Birkot HaTorah before learning any part of the Torah (Shulchan Aruch, Orach Chaim, 47:2). In other words, even one who only intends to learn Midrash or halachah on a particular day must recite Birkot HaTorah at the onset of that day. The reason for this is that the entire Torah – whether it is Torah Shebichtav (the Written Torah) or Torah Sheb’al Peh (the Oral Torah), the halachic segments or the philosophical – was all given from Hashem to Moshe on Mount Sinai (Yerushalmi, Pe’ah, chapter 2, halachah 4) and when studying them, one must recite, “Who chose us from among all His nations and gave us His Torah.”
There is dissension among the poskim regarding whether or not Birkot HaTorah must also be recited before thinking Torah thoughts. For example, a person who arises in the morning with the desire to ponder a few ideas of Torah, according to most poskim does not need to recite the berachot. Still, there are those who disagree. In order to avoid uncertainty, one who wakes up and wishes to reflect upon words of Torah should first recite Birkot HaTorah and immediately afterwards say a few verses. However, someone who temporarily wakes from his sleep in the middle of the night, and wants to contemplate Torah ideas until he falls back to sleep, need not recite Birkot HaTorah.[4]
Those who listen to Jewish music when they wake up in the morning or in the middle of the night do not need to recite Birkot HaTorah since they do not have the intention to learn.
One may recite Birkot HaTorah and Birkot HaShachar while standing, sitting, lying down, and walking. Nevertheless, there are those who are strict to say Birkot HaTorah while standing, or walking, but not while sitting or lying down.[5]