Q407: magic staffs

If a magic staff allows you to "use an action to expend one or more of the staff's charges to cast ..." Are you casting a spell or is the staff causing an effect? In other words, can you do it while raging?

If the staff's description doesn't include "can be wielded as a magic quarterstaff that grants +X bonus to attack and damage rolls" can you still wack bad guys with it like a standard quarterstaff, is it useless as a melee weapon, or is it an improvised weapon (like a tree branch)? Assuming you can bash with it, does the magic staff overcome Immunity or Resistance from non-magical attacks?

Thanks