Guest posting is the practice of writing and publishing an article on someone else's website, typically including a link back to your own site within the content or in an author bio. Done well, it puts your expertise in front of a new, relevant audience and earns a genuine editorial backlink.
The risk comes from how it's often done at scale: content farms and link networks exist purely to sell placements, with no real audience or editorial standards behind them. Google has specifically called out guest posting done primarily "for SEO purposes" — meaning link networks with thin content and no real traffic — as a target for manual action.