To stop the hammering sound a person will need a few simple tools and these include a channel lock or pipe wrench and a hammer arrestor . If you do not have theses they can be purchased at a hardware store. Having towels and buckets would also be a good idea to catch and clean up any water that might spill out of the hoses.
The first thing a person has to do is to turn off the water supply to the washing machine or appliance that needs to be treated. This is done by tuning the valve off to where the hose attaches to the water supply. If a person cannot do that, then the entire house water supply needs to be turned off at the valve where the water supply comes into the house.
Next, remove the hose from the valve with the channel lock or pipe wrench. You will need to loosen the fitting with the wrench, and then you can finish taking the hose off with your hand. Look at the set up of the valve. A person will need to remember this set up or take a picture and go to a local hardware store or plumping supply store to purchase a hammer arrestor . The hammer arrestor comes in many different angles and styles so you will want to choose one that works best for you.
Once you have the hammer arrestor, attach it to the valve and tighten it with the wrench. Once the hammer arrestor is attached, re-attach the hose to the hammer arrestor and tighten the hose with the wrench.
Turn on the water to the appliance or house and check for leaks at the attachment sites. If leaks are present re-tighten all the attachments until all leaks are stopped. Be sure to try all the faucets in the house and run the washing machine. The entire hammer may not be gone, but it should be significantly reduced.