I have read that when matter and antimatter collide they just cancel out each other with the emmision of bright light. But doesn't it violate law of conservation of mass? If the the atoms dissapear into nowhere?
Antimatter comes from the level of quantum mechanics and particle physics, not classical physics, and is subject to special relativity mechanics, not Newtonian mechanics. Specifically the particles are described by four vectors, $(E,p_x,p_y,p_z)$ where E is the energy of the particle and p the momentum.
There is no conservation of mass at the quantum mechanical and special relativity level. Only conservations of the momentum and energy in the fourvectors participating in the interaction.
The "length" of the four vector characterizes the particle and it is called the invariant mass. The particles in addition are characterized by a number of quantum numbers, which are conserved quantities:baryon number, lepton number, charge, strangeness...
The antiparticle of a particle has to have the negative of these quantum numbers by definition of antiparticle. When particle and antiparticle interact, the sum of the quantum numbers is zero and the four vector of the sum can disperse in new combinations of particles and antiparticles, or even photons, as happens with electron positron annihilation at low energies into two photons( at high energies particle antiparticle pairs can be produced given enough energy)