The prefix "pre-" means “before,” so it makes sense that a prelude is an introductory action, event or performance that comes before a bigger or more momentous one.
People speaking old school French and Latin understood a prelude to be the "notes sung or played to test the voice or instrument." Today preludes are more like introductions than practice, but you can still think of them as a small warm up to the main event. Preludes are often used in classical music, as well as in novels, to set the tone for the rest of the orchestral piece or story.