How to develop an Eraser Tool ?

How to develop an Eraser Tool ?

Hello everyone, i am trying to develop an eraser tool that should erase the part of an image using mouse control. Image is uploaded by the users.
Thanks