If I take control of a black creature using a white deck, how do I pay the mana cost to attack if I don't have swamps in my deck? Please help, I'm new to the game.
The only cost-like requirement to attacking is the tapping of the attacker. There is no mana cost. While certain cards impose restrictions on attacking, and while some even impose a cost (e.g. Ghostly Prison), the cost never requires colored mana.
Many creatures have abilities that require colored mana to activate. If you control such a creature, and if you don't have the ability to produce mana of that color, you may not activate its ability. For example, if you control a Asphodel Wanderer and you have no means of creating black mana, you can't use its ability.