When you receive a written job offer, this forms the first part of a contract of employment between you and an employer. The second part of that contract is your letter of acceptance. Once you have sent in that letter of acceptance, you are legally bound to accept that job. It is not a good idea to accept a job with the intention of rejecting it later if something better turns up.
When writing your acceptance letter, thank the person making the offer and confirm that you wish to accept the job. You should also mention the date of their letter and quote the full job title and the starting date if this has already been discussed. You may wish to end by saying something along the lines of the fact that you are looking forward to starting work with the organisation. Keep a copy of this letter for your records.
If you decide to reject the job offer then write back thanking the organisation for the offer and politely decline it. You may like to do this face-to-face, as well as written. Especially if you are working within a narrow industry sector, you might find yourself working with, or even applying for a job at, that organisation again at a later date so it is worth remaining on good terms! Try to send the letter or organize a meeting asap so that they can offer the job to someone else.