In order to edit a record, a user needs to have "Update Object" on their Profile, as well as "Edit" access or higher to a record. In other words, neither "override" the other in this scenario. The user would not be able to edit the record, because they lack one of the two requirements to do so. The Profile can override Sharing with "Modify All Data" or "Modify All Object" (where Object is the type in question), but Sharing can never override Profile permissions.
Note: Yes, the Sharing prevents editing in this case, but this is not technically an override. Both permissions and access are needed to edit the record.
Note 2: Permission Sets can increase Permissions for a user, but cannot take away Permissions. Similarly, a Sharing setting can add access to a record, but cannot "remove" access to a record. The most permissive Sharing access wins. This can be by Organization Wide Defaults, Role Hierarchy, Sharing Rules, Manual Sharing, Implicit Sharing, and Ownership.