Unless you are personally known to the member of the royal family you should address your letter to the Private Secretary or a Lady in Waiting, asking that the subject of the letter be known to Her Royal Highness.
In such cases the letter can begin and end:
Dear Sir or Dear Madam (if name not known) Yours faithfully
Dear Sir Martin Yours sincerely
Envelope: The Private Secretary to NAME OF ROYALTY
For those who do wish to write directly to the member of the royal family, the letter should begin ‘Madam’. It ends with ‘I have the honour to remain, Madam, Your Royal Highness’s most humble and obedient servant’ and then your name.
Within the body of the letter do not use ‘you’ (singular) or ‘your’ (singular). Instead use ‘Your Royal Highness’ and ‘Your Royal Highness’s’.
Envelope: Her Royal Highness the The Princess Royal (for example).
When being presented to royalty (those with the style Her Royal Highness) men are expected to bow from the neck. Women can either bow or curtsey. If a curtsy is given it is just a short bob, keeping the back straight, hands by the side and dropping the knees slightly and bowing the head.
Those who do not wish to bow or curtsy do not have to. Technically, only those who have His Majesty The King as their head of state need to bow or curtsey to The King or his family. Citizens of other countries, for example America, may bow or curtsey if they wish but do not have to.