So in the 2nd measure of the Hungarian Rhapsody no.12 has the word "trem" what does that mean? I don't understand it.
The trem. means tremolo which means to alternate between two beamed notes at the speed of the beaming. If you look at the beams in the score you'll see they are at 32nd note speed hence the 3 beams. The reason for the trem. marking is there because you may just mistake the notes written for 32nd notes instead of a tremolo.
I suggest listening to the piece to get a feel for how the tremolos should sound.