Well, If you're using Cura, the simplest would be to use the "pause at height" plugin.. It basically pauses the print at a given height, allowing you to change the filament, and then resume...