One must recite Birkhot Ha-Torah before studying any part of the Torah (SA 47:2). In other words, even one who only intends to learn Midrash or halakha on a particular day must recite Birkhot Ha-Torah at the onset of that day. The reason for this is that the entire Torah – whether the Written Torah or the Oral Torah, halakha and theology – was all given from God to Moshe at Sinai (y. Pe’ah 2:4), and when studying them, one must recite, “Who chose us from among all His nations and gave us His Torah.”
The poskim disagree about whether Birkhot Ha-Torah must also be recited before thinking Torah thoughts. For example, one 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 berakhot. 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 Birkhot Ha-Torah and immediately afterwards recite a few verses. However, one who temporarily wakes from her sleep in the middle of the night and wants to contemplate Torah ideas until she falls back to sleep need not recite Birkhot Ha-Torah beforehand. 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 Birkhot Ha-Torah since they do not have intention to learn (Peninei Halakha: Prayer 10:4 and n. 4).
One may recite Birkhot Ha-Torah and Birkhot Ha-shaĥar while standing, sitting, lying down, or walking. Nevertheless, there are those who insist that Birkhot Ha-Torah be recited while standing or walking, not while sitting or lying down (ibid. ch. 10 n. 5).