An adverb meaning 'while (you're) at it' or 'incidentally' — doing something else at the same time as a main task (in the pattern 'do X on the way / while doing Y').
買い物のついでに図書館へ本を返してきた。
I returned the book to the library while I was out shopping.
駅に行くついでに彼に会って用事を頼んでくれない?
Could you meet him and ask him a favor while you're going to the station?
掃除のついでに窓も拭いておいた。
While cleaning, I also wiped the windows.