Programmatically update additional field's value

I would like to know the function that I can use to programmatically change the value of Appointments+ additional fields.