The Shulhan Aruch (Orah Haim, end of Siman 677) writes that one may not derive any personal benefit from any oil or wicks that have been left over from the Hanukah candles. Leftover oil must be collected and burned, and leftover wicks should be stacked together and discarded.
There is some discussion among the Halachic authorities in explaining this ruling of the Shulhan Aruch. According to some views, the Shulhan Aruch refers here only to a case where the Hanukah candles were extinguished within a half-hour after they were lit. Since the essential obligation of Hanukah candles requires that the candles burn for a half-hour, only in such a case is the oil deemed designated for the Misva and thus forbidden for personal use. If, however, the candles burned for a half-hour or longer, the remaining oil is not endowed with any special status, and one may use it as he pleases. Other authorities, however, maintain that in all cases, the leftover oil must be treated with Kedusha (sanctity), regardless of when the candles were extinguished. Only if a person explicitly stipulated that he designates for the Misva specifically the oil used during first half-hour of kindling may he use the oil that remains after a half-hour of burning.
As for the final Halacha, Hacham David Yosef rules in his Torat Ha'mo'adim (Hanukah, p. 126) that one should preferably stipulate before lighting candles on eighth and final night of Hanukah that the status of Kedusha applies only to the oil that burns during the first half-hour. Then, if the candles burn for a half-hour or longer, he may use the leftover oil as he pleases. If he did not make such a stipulation, or if he did but the candles were extinguished within a half-hour, then he should collect the leftover oil after Hanukah and burn it separately. Leftover oil from the candles lit on the first seven nights should simply be used for lighting the subsequent night, which is permissible according to all authorities.
Leftover wicks should be collected in a separate bag and discarded. This as well as the burning of the leftover oil should be done as soon after Hanukah as possible, in order to ensure that one will not mistakenly make personal use of the oil or wicks.
If a person purchased oil for lighting Hanukah candles but in the end did not use it, the oil is not endowed with any special status, and may one use it as he pleases. Thus, for example, if a person purchased a bottle of oil for lighting Hanukah candles and used only half the bottle, he may use the remaining half for any purpose, including seasoning, frying and so on. This is due to the Halachic principle of "Hazmana Lav Milta," which means that verbal or mental designation of an object for a Misva is not Halachically significant. Accordingly, the fact that one had intended to use the oil for the Hanukah candles does not endow the oil with any status of Kedusha.
Furthermore, even if one poured oil into the Menorah with the intention of lighting with it, so long as he did not actually light the Hanukah candles with that oil he may still use it for whichever purpose he chooses. The work "Peri Ha'adama" records an incident where a woman ran out of olive oil while cooking on Erev Shabbat Hanukah, and so she took some of the oil that had been poured into the Menorah in preparation for lighting. She used this oil for baking a cake, and her husband, upon discovering that she had taken oil from the Menorah, refused to eat the cake. They consulted with the local Rabbi who informed them that the cake is permissible for consumption. Since the oil was never actually used for the Misva, it did not assume a status of Kedusha and was therefore permissible for personal use.
Summary: Leftover oil and wicks from the Hanukah candles that were lit on any of the first seven nights of the holiday should be reused for lighting the subsequent night. On the eighth night, one should preferably stipulate that only the oil that burns during the first half-hour is designated for the Misva. Then, if the candles burn for a half-hour or longer, he may use the leftover oil as he wishes. If the candles are extinguished within a half-hour, or if he did not make this stipulation, then he must collect the leftover oil and burn it. The wicks after Hanukah should be collected in a bag and discarded. Oil that one intended to use for Hanukah candles but was ultimately not used for this purpose is entirely permissible for personal use, even if it had been poured into the Menorah.