A hybrid mana symbol such as {2/B} or {W/B} presents two alternative ways to pay it. You may pay either option to satisfy that symbol. Because one of those options is a specific color of mana, any land or source that produces that color works perfectly.
Under CR 202.2c, a hybrid mana symbol is paid by choosing one of its two component costs and paying that. A basic Swamp produces {B} (CR 305.6), which satisfies the black half of any hybrid symbol that includes black, such as {W/B} or {2/B}.
It is important to note that hybrid mana symbols still count as the colors they contain for all other purposes (CR 202.2c). A card with {W/B} in its cost is both white and black regardless of how you paid it.
Concrete example: You want to cast Unmake, which costs {W/B}{W/B}{W/B}. You have three Swamps. Tapping all three gives you {B}{B}{B}. You pay the black alternative of each hybrid symbol, satisfying the entire cost. Unmake resolves normally.
So yes, a Swamp's mana absolutely can pay the colored pip inside a hybrid mana symbol whenever that pip matches black.
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.