Trying to win someone's favor.This is a slang term or idiom that originated in the early 20th Century.
You could probably get a salary bump by polishing the apple a little more with your boss.