As found in a cam-in-block engine, lifters are responsible for transmitting the movement of the camshaft lobes to the pushrods. The pushrods actuate the rocker arms, which open the valves. Hydraulic lifters allow the valve lift to increase with engine rpm by filling up with oil as the oil pressure rises. The oil inside pushes the rocker arms further away from the camshaft, which causes the valves to open further. Oil pressure failures are usually at the root of lifter tapping, also known as lifter collapse.
Check the oil level. If the oil level is low enough, the oil pump may begin to suck in air at high RPM, thus starving the lifters of the required pressure. If the oil level is too high, the rotating crankshaft and rods will splash into it, forcing air bubbles into the air and turning it into a meringue-like foam that won't build the appropriate pressure. If it's too high, drain the oil pan and refill it with the appropriate amount of fluid. If it's too low, add oil in through the filler cap until it's up to the appropriate level.
Start the engine and check to ensure that you're getting adequate oil pressure and listen for lifter tapping. Add an oil-flushing solvent into your engine. Start the engine and set it to idle at about 1,000rpm by turning the idle-adjustment screw on the throttle body clockwise. Allow the engine to idle for fifteen minutes.
Sit behind the wheel, and very gradually raise the throttle up to about 2,500rpm then release it. Continue doing this over and over again for about five minutes. This will continuously pressurise and depressurise the lifters, sending the solvent through and breaking lifter plungers loose.
Drain the oil into your oil drain pan, but leave the old oil filter in place. Refill the engine with very lightweight engine-flushing oil. These specialised oils are typically 0W-20 weight and only slightly thicker than water.
Allow the engine to idle for 20 minutes, repeating the lifter pump-up procedure in step three about once every three minutes. Drain the oil, unscrew the old filter from the block, replace it with a new one and refill the engine with the recommended oil. Start the engine and check for lifter tapping.
Remove the engine's valve covers and check for broken or bent components. If you find that the engine had bent pushrods, worn out lifters (or lash adjusters on an overhead-cam engine), damaged or worn out rocker arms (cam followers on an overhead cam engine) or worn out valvesprings, then you'll need to replace the affected components.
The worst case scenario is that the valve stems are worn out where they come into contact with the rocker arms, in which case you'll have to remove the cylinder heads to replace the valves. If your engine uses adjustable rocker arms, you may need to simply adjust them to obtain the proper clearance (aka valve lash). However, most modern engines use a non-adjustable valvetrain where a properly-functioning hydraulic lifter or lash adjuster keeps the valvetrain running with zero clearance.