The Shamash-Purpose & Halachic details:
A. Its name and the candle that it refers to:
The technical term Shamash refers to the candle used to light the Chanukah candles, hence lending it its name “the servant,” and not necessarily to the extra candle that is lit in addition to the set number of candles of that night, as will be explained. Nevertheless, the custom amongst Ashkenazi Jewry is to designate the Shamash that was used to light the candles as the extra candle, and hence this extra candle is referred to as the Shamash. Alternatively, this extra candle that remains by the Menorah is called the Shamash even if one used a separate candle for the lighting, as is the custom amongst Sephardim who light a separate extra oil candle for the Shamash. This extra candle is called a Shamash being that one can use it for his benefit [unlike the actual Chanaukah candles which are prohibited in benefit], and hence its name refers to its potential use.
Whatever the case, for semantic purposes, whenever the word Shamash is used in this article, it refers to the extra candle that is lit by the Menorah, as is indeed the intent of people when they use this term.
B. Its purpose:
It is customary to light an additional [single] candle to the set number of candles which are required to be lit for that night of Chanukah, and this extra candle is customarily referred to as the Shamash. The reason for this custom is because it is forbidden to make use of the light of the Chanukah candles. Hence, we place a non-Chanukah candle near the candles in order so one who uses the light will do so from the permitted candle.
The mystical reason: There are a total of eight Shamashim that are lit during Chanukah. Each Shamash contains a great holiness, similar to the Kohen who would light the Menorah, and similar to the Serafim who shine the Kisei Hakavod. This is why the Shamash must be placed higher than the other candles.
C. Should the candle used for the lighting also be used as the Shamash?
Letter of the law: There is no obligation to use the candle which was used to light all the candles as the extra candle that is lit near the other candles of the Menorah. Accordingly, many [especially Sephardim] are accustomed to preparing an extra oil candle as the Shamash, and they use a wax candle to light it.
Ideal custom: Despite the above, it is customary amongst Ashkenazi communities, to use the Shamash, which is the candle used to light the Chanukah candles, as the extra candle and hence after the lighting is complete, the Shamash is placed together with the other candles. This latter custom is the better custom. If, for whatever reason, one is unable to use the Shamash wax candle for this purpose, then at the completion of the lighting, he is to light an additional oil candle which is at a recognizable distance from the Chanukah candles.
D. The type of oil or wax or wick:
From the letter of the law, the Shamash may be made of any type of oil, or wax, or wick. However, due to both Halachic and esoteric reasons, the custom is to use a Shamash that is made of bee’s wax.
Shabbos Chanukah: On Shabbos Chanukah, the Shamash must be made of oil/wax that is permitted to be used for the Shabbos candles. Likewise, on Shabbos Chanukah, the Shamash must contain a wick that is permitted to use for the Shabbos candles.
 See Nitei Gavriel 20
 See Rama 673:1 “In these provinces, the custom is not to add a candle, and we simply place the Shamash which was used to light the other candles.”
 See M”A 671:5 “From this came the custom to light a Shamash”; 673:4-5; Machatzis Hashekel 673:1; Levushei Serud 673:2; P”M 671 A”A 5
 See Levushei Serud ibid “Through the Shamash one is able to do work near the lights”
 Michaber 673:1; Tur; Rabbeinu Yerucham
 Lighting two candles: Some are accustomed to light two extra candles near the Menorah. [See Nitei Gavriel 20:6 footnote 14; Custom of Belz, recorded in Piskeiy Teshuvos ibid]
 Michaber 673:1; Shabbos 22b
The reason: This prohibition was enacted in order to properly emphasize the Mitzvah status of the candles and thereby publicize the Chanukah miracle to all. [Rashi brought in M”B 673:8] Furthermore, since the candles commemorate the miracle that occurred with the Menorah, therefore it receives the same law as the Menorah in which its candles are forbidden in benefit. [Ran brought in M”B 673:8]
 Michaber ibid
In today’s times of electricity: In truth, in today’s times of electricity, the use of the extra candle called the Shamash has become obsolete, as we no longer need it for the sake of light. Nonetheless, the custom is to light an extra candle as it contains mystical meaning. [Piskeiy Teshuvos 673:7]
 Kav Hayashar 96
 See Michaber and Rama 673:1
Background: The Michaber ibid writes that the custom is to place an extra candle at a distance from the Chanukah candles, to serve as the extra light, and all the candles, including the extra candle, is lit using the Shamash. Thus, the extra candle is not the same candle as the Shamash. Accordingly, many are accustomed to preparing an extra oil candle as the Shamash, and they use a wax candle to light it. [Piskeiy Teshuvos 673:7 that so is recorded in the name of Rebbe Yitzchak the son of the Raavad] However, the Rama ibid writes that it is not our custom to place an extra candle near the other candles during the lighting and rather we simply place the Shamash that was used for the lighting near the other candles when the lighting is complete. This is considered a better custom [Rama ibid] being that it makes it more evident to the onlooker that the Shamash is not one of the candles being lit for its obligation that night. [M”B 673:19 in name of Peri Megadim]
 Pashut, as the main point is that there be an extra candle by the Menorah, and whether it is the original candle used for the lighting is irrelevant; See Michaber and Rama 673:1
 See Michaber 673:1 as commented on by Rama ibid from whom it is evident that according to the Michaber an extra candle was lit from the “Shamash” candle which was used to light all the other candles, and hence the “Shamash” was not designated as the extra candle and was extinguished as soon as all the candles were lit; See Piskeiy Teshuvos 673:7 that so is recorded in the name of Rebbe Yitzchak the son of the Raavad; See also Machatzis Hashekel on M”A 673:2 that the Shamash is made with an oil and a wick
 Rama ibid
 Rama ibid
The reason: As by doing so it is more evident to the onlooker that the Shamash is not one of the candles being lit for its obligation that night. [M”A 673:6; Peri Megadim 673 A”A 6; M”B 673:19]
 Michaber ibid writes that this is the initial custom, as brought in previous footnotes, the Rama ibid writes using the Shamash is better, although he too agrees that if one can’t use the Shamash then one is to follow the custom of the Michaber
 See Machatzis Hashekel 673:1; Seder Hayom
 Hagahos Maharil; Sefer Haminhagim p. 157 [English]; Darkei Chaim Veshalom 814; See Piskeiy Teshuvos 673:7 footnote 37
The reason: As bee’s wax is the closest quality to oil [see Rama 673:1], and obviously olive oil cannot be used being that one needs to use the Shamash to light the other candles. In addition, we desire to make a distinction between the candles of the Mitzvah and the Shamash. [Sefer Haminhagim ibid]
 M”A 673:1; Bach 673; Kneses Hagedola 673:2; Elya Raba 673:4; Machatzis Hashekel and Levushei Serud on M”A ibid