It's failry straightfoward. It should be formal, like a letter, but using the salutaion 'To whom it may concer', then it should include who you are writing a refernce about, your relationship (professional, etc, how long, what capacity) with them. The qualities you think they have that make them suitable for the postion if it's for a specific job, or just the qualities they have if it's general. If you like them end with 'I have no hesitation in recommending', add that they can contact you for further information and close the letter with 'Yours faithfully'.
- For Teachers