At this point, you have used SOQL to retrieve a set of User records. The last piece of the data manipulation puzzle is the ability to write data through Data Manipulation Language (DML) syntax. Apex has a set of commands that make this final step very simple.
There are two ways to perform data manipulation requests with Apex. The simplest uses a simple DML statement for each different data manipulation action, including the following:
Insert - adds records to a Force Platform database object. The Force Platform automatically creates a unique ID for any record inserted.
Update - updates values in an existing record in a Force Platform database object, based on the ID of the record.
Delete - deletes records ...