The dbDelta function is part of the utility functions that WordPress calls when performing version upgrades. When called, it parses the table creation SQL command that it receives and figures out the difference between the table structure that it describes and the current table, if the table exists. Once that difference has been established, it performs the necessary changes to align the two structures.
If both the structures are identical, it leaves the table as it is. With this approach in place, any changes to the structure can simply be implemented by altering the table creation query. As such, the dbDelta function can actually be used from the first version of a plugin to ensure an easy upgrade path.