It's "marbles", with an r, which are small glass spheres which children play with (or used to). The expression "lost his/her marbles" means that the person is acting in a stupid or crazy fashion. The expression may arise from another way of saying that someone is being stupid, which is that his/her head is so empty of brains that you can hear marbles rattling around in it. Presumably, to lose your marbles is a further step down the road to total insanity.