Foul Play inflicts damage. It uses the target's Attack stat to calculate damage, as opposed to the user's Attack stat. The damage calculation references the target for stat stage changes to the Attack stat but references the user for all other modifiers to Attack (including held item, Ability, and burn).
The user turns the target's power against it. The higher the target's Attack stat, the greater the move's power.