The movie explains it as a polymer that reacts to ultrasonic waves which are produced by the lighters. While this explanation is completely unrealistic, what the characters are trying to accomplish, being able to control when a dice is weighted, isn’t totally impossible
For starters magnetic dice are a real thing, however the pips in those dice are made from rare earth magnets and when rolled on a metal table will stop after just two or three rolls. However even with these you’d have no way of controlling the roll
The only real way to do what they did in the movie would be to have metal pips on one side of the die, similar to how a weighted die works, and then have an electromagnet under the table. You would then use the lighter as a remote to turn the electromagnet on and off. Electromagnets are way stronger than rare Earth magnets and would pull the metal pips down with a lot of force, effectively stopping the dice in its tracks. With enough practice you could probably get the timing down and make it look convincing, but the set up isn’t practical. You’d be better off swapping in regular weighted dice than trying to hide an electromagnet under the table.