While a project is still live you can cancel your pledge by visiting the project page and clicking the "Manage your pledge” button on the right-hand side. From there, click "Cancel Pledge" next to the "Change your pledge" link.
Remember, a pledge can only be cancelled while a project is live. If the project has ended and pledge collection has started it is no longer possible to cancel.
Additionally, it is not possible to decrease or cancel a pledge during the last 24 hours of the campaign if doing so would drop the project below its funding goal.