What is the scratching sound produced by aircraft on the ground (taxi-in/taxi-out)?
There is a variety of sounds an aircraft can produce, some even depending on the type of aircraft you are sitting in. Without any further data or reference, the most likely events that you can hear during pushback, taxi or vacating the runway are:


Cargo Doors being shut and locked
Flaps being extended to take-off position
Flaps being raised after landing


There are many more things that you can hear from the cabin, so without further information, it will be difficult to pin-point.

Another option, if it was predominantly on Airbus aircraft, is the Power Tranfer Unit, which is described to sound like a barking dog or like a drill.

See also this question and the answers:
What is this sound from Airbus aircraft before take off?