Customized widgets

Is there a way to modify the existing widgets?Is it that i need to create a new widget ,copy the code and make it working as we like?please suggest.