There are at least two options:
1. If your keyboard has a training function, you can use midi files. It is very convenient.
2. If you are learning a piece and can’t figure out how a certain part of it should sound, you can listen to the file using the screen of your keyboard or a sheet music program. You will be able to see the note that is being played and figure out how to play the piece on your own.