One may not benefit from the light of the Ĥanuka candles, whether for mundane purposes, like counting money, or sacred purposes, like studying Torah. This is because the candles are designated for the mitzva of lighting Ĥanuka candles, and just as one may not benefit from the candles of the Menora in the Temple, so too, one may not benefit from the Ĥanuka candles, which were instituted in commemoration of the miracle that occurred in connection with the Menora. Furthermore, the purpose of the candles is to publicize the miracle, and if one were to use their light, it would appear as if he lit them in order to illuminate the room, not in order to publicize the miracle (sa 673:1).
One may not use leftover oil or candles that were not completely consumed, because they were designated for the mitzva the moment they were lit. Preferably, one should use them for Ĥanuka candles on the remaining days of the holiday, but if they are no longer fit for such use, or if they are left over after the eighth night, one should burn them (sa 677:4, mb ad loc. 18). Alternatively, one may pour the extra oil down the drain and put the remaining wicks in the garbage. Candles left in their package and oil left in the bottle may be used for any purpose.
If one begins lighting the candles and the shamash goes out, he may not rekindle it using one of the Ĥanuka candles, because the shamash is not considered to be designated for use in a mitzva, and one may not light a non-mitzva candle from a candle designated for the mitzva. If, however, one has used up all his matches, and if he does not relight the shamash he will not be able to continue lighting the rest of the candles, he should light the shamash from a Ĥanuka candle.
Technically, one may benefit from the candles after they have burned for half an hour. However, it is customary to be stringent and refrain from deriving any benefit from them, even after half an hour passes, because even then the lights publicize the miracle, and if one were to use them, it would seem as if he is denigrating the mitzva. Furthermore, since he prepared the candles for the sake of a mitzva and did not plan on benefiting from them after half an hour passes, some say that the entire candle has been sanctified for the mitzva, and thus one may not use it for mundane purposes.
. See Shabbat 22a; Berur Halakha ad loc.; sa 674:1. This issue has dfferent opinions and many details, but the prevalent custom is not to light even one Ĥanuka candle from another, as Rema, mb, and Kaf Ha-ĥayim 674:8 state. In pressing circumstances, one may rely on the more lenient opinion.
. sa 672:2, mb ad loc. 7-8. We take into account the opinions of both Maharshal, who is concerned that onlookers will think that he is benefiting from forbidden objects, and Baĥ, which permits one to derive benefit from the candles only if he stipulates that the sanctity will not rest upon the leftover oil or wax after half an hour. Also, see below 13:4, where I explain that it is preferable nowadays to light the candles for more than half an hour. Based on these ideas, I wrote in the main text simply that the remaining oil is forbidden, without differentiating between whether the candles already burned for half an hour or not. However, if one intends to extinguish the flames after half an hour and use the leftover oil or wax for mundane purposes, he may do so, as mb 677:18 explains.