A common method of testing the silver content of a metal is to use a mixture of nitric acid and potassium dichromate — Schwerter's solution — and then analyzing the color of a testing paper applied to the piece. The chemicals are hazardous, however, so care should be taken.
Using a mass spectrometer to analyze the molecular structure of the metal is one of the most reliable way to test whether a metal is silver, but it requires expensive specialized equipment, so it is primarily used by assay offices. Some experts may also use handheld X-ray fluorescence analyzers to check the purity of the metal. For larger pieces of silver, a sample may be taken and then melted and chemically assayed. This cannot be used for silver jewelry or coins because of the damage it causes.
Many tests that can be performed at home can give you an idea of whether your item is silver, but they cannot guarantee it. Silver is not magnetic, so an easy way to rule out many fakes is to see if a magnet attracts them. It also has a distinctive ringing sound when dropped on or struck by something hard, such as a hammer. If you have an item that passes both of these tests, you may wish to take it to a silversmith or jeweler to confirm its silver content.