The Princess Elizabeth was part of the Territorial Army Service in the Auxillary Territorial Service and had the service number 230873 [1]. The Territorial Army Service itself went onto to form part of the Women's Royal Army Corps. During her time in the ATS, she was promoted to Junior Commander. [2]
As part of National Service during World War 2, unmarried women between the ages of 20 and 30 were called up to serve in the auxiliary services, including the ATS, the Women's Royal Naval Service, the Women's Auxillary Airforce, and the Women's Trasport Service. Women could also join the Women's Voluntary Service and the Land Army.
It was Elizabeth's choice to join the ATS, and she certainly completed the training to become a qualified lorry driver [3]. This included taking driving and vehicle maintenance courses [4][5][6]. On completion of her training, her role in the ATS was mostly symbolic, according to Ben Pimlott: "The rank was an honorary one, but the training in driving and vehicle-maintenance she underwent at No1 Mechanical Transport Training Centre at Aldershot, was genuine." [7] The taking and publishing the heir to the throne doing her part for the war effort would have been used to boost the morale of the country and encourage other young women to join the auxiliary services. As Pimlott says, "Since the enrollment of a royal princess could not be kept secret, her participation in the ATS inevitably became part of the morale-boosting display of the Monarchy."
Members of the ATS could expect to be deployed during the war, or to support the war effort at home. It is unlikely Elizabeth would have been deployed abroad or be placed in dangerous positions on the home front, particularly as her involvement was so well publicised. This can also be seen more recently, with Price Harry being withdrawn from deployment in Afghanistan due to fears of him being targeted [8].
Sources:
[1] The London Gazette, 6th March 1945 https://www.thegazette.co.uk/London/issue/36973/supplement/1315
[2] The London Gazette, 31st July 1945 https://www.thegazette.co.uk/London/issue/37205/supplement/3972
[3] The Royal Collection Trust https://www.rct.uk/collection/2002230/hm-queen-elizabeth-ii-b-1926-when-princess-elizabeth-trains-as-an-a-t-s-officer
[4] The Royal Collection Trust https://www.rct.uk/collection/search#/2/collection/2002239/princess-elizabeth-trains-as-an-a-t-s-officer-at-a-training-centre-in-camberley
[5] The Royal Collection Trust https://www.rct.uk/collection/search#/7/collection/2080729/princess-elizabeth-training-with-the-auxiliary-territorial-service
[6] The Royal Collection Trust https://www.rct.uk/collection/search#/6/collection/2999896/hm-queen-elizabeth-ii-b-1926-when-princess-as-a-member-of-the-auxiliary
[7] The Queen: A Biography of Elizabeth II, Ben Pimlott, referred to by Stack Exchange https://history.stackexchange.com/questions/34480/was-princess-elizabeth-a-van-ambulance-driver-mechanic-during-ww2
[8] Afghan Taliban threaten to kidnap and kill Prince Harry, Reuters https://www.reuters.com/article/us-afghanistan-britain-prince-idUSBRE8890IN20120910