If the system is wired and you have a single tamper loop, the fault could occur at any of the sensors or junction boxes on the loop or the sounder. If there's an individual tamper for each zone, this narrows things down. Check the spring is being pushed down entirely and isn't being pushed awkwardly off to one side when the lid closes. Check wires are pushed fully into terminals and they are screwed down tight. Junction boxes usually have springy metal contacts that implement the tamper. A piece of plastic on the lid pushes the contacts together when the lid is replaced. Make sure there are no wires in the way preventing the lid from sitting properly on the box.
If your alarm identifies which sensor is causing the problem and you have a multimeter, you can remove the tamper wires from the screw terminals and check that the meter indicates continuity when the switch is closed. For a wireless alarm, again make sure the lid is sitting properly when replaced and also that batteries in the sensor/sensors are ok.