What will happen in the background, when we update a record in a table in Postgres?
In general, a new row version will be created by an update to support MVCC. This might not happen under certain conditions e.g. if the update does not change any indexed column. 

The space  occupied by the old row version will be freed by the auto-vacuum process and re-used for new data once there are no more transactions that would see that version.