This is because you are creating new objects, storing them in a list and attempting to update the list. You aren't using the existing custom settings that you have retrieved. You will get an error if you attempt to update a newly created custom setting that doesn't have an id.
Are you looking to update the custom setting from a trigger on an sobject record?
If so, you'd just do it like a regular sobject - retrieve the details using SOQL, make the change and then use the update call to save the changes.
i am getting error while saving record invalid id
Care to post some code?
can u give me some sample code
This is because you are creating new objects, storing them in a list and attempting to update the list. You aren't using the existing custom settings that you have retrieved. You will get an error if you attempt to update a newly created custom setting that doesn't have an id.