I have only partial information based on a quick search in Wikipedia.

According to Wikipedia, Hilbert coined the term "ring" (Zahlring) in an article written in 1897 titledDie Theorie der algebraischen Zahlkörper.

Ring (mathematics) - Wikipedia, the free encyclopedia

Also according to Wikipedia, the term "magma" was coined by Bourbaki.

http://en.wikipedia.org/wiki/Magma_(algebra)

I'm just guessing, but maybe the term "magma" was chosen because an algebraic magma has very little structure, something like a magma flow.