Almost always appears with 拍 (pāi, to slap): 拍马屁 = to flatter. A 马屁精 (mǎpìjīng) is a 'flattery demon', i.e. a brown-noser.
history
The full proverb 拍马屁 comes from Mongol custom: patting someone's horse on the rear and praising it was a way to stay on their good side. The practice became synonymous with empty flattery.