Example:If a pokemon have magic guard than it got burnt by any moves that burns or holding a flame orb will its attack be decreased?
Yes, if a Pokemon with magic gaurd is burned, it's attack will be halved, but it will take no damage. Source: http://bulbapedia.bulbagarden.net/wiki/Burn_(status_ailment)