How do people load filament, prime the printhead, flush out the old filament when changing colors when using a standalone 3D printer?
My printer (IdeaWerk 150) is very basic and doesn't have any options for this from the screen.

I wrote a really simple GCODE file that brings the nozzle up to temperature, then runs the extruder for a few seconds, then waits, then extrudes for a bit again. I think it does this 3 or 4 times then stops. I can put the file (when converted to .x3g!) onto an SD card and run it whenever I need it.

I have a similar file that allows me to level the bed without a computer by just moving the nozzle around to a few key points on the bed and pausing for a few seconds.

I used a GCODE file generated by my slicer in verbose mode to get started, along with a list of codes

I don't have these files to hand at the moment, but this is my start.gcode:

(**** beginning of start.txt ****)
(This file is for a WeisTek IdeaWerk 150)
(**** begin initilization commands ****)
G21 (Metric FTW)
G90 (Absolute Positioning)
M18 (This disables the stepper motors.)

G92 X0 Y0 Z0 A0 B0 (Declare the current position to be 0,0,0,0,0)
(**** end initilization commands ****)

(**** begin homing ****)
G161 Y X F2500
G92 X0 Y0 Z0 A0 B0
G1 X5.0 Y5.0 Z-5.0 F450
G162 Z F450
G161 Y X F2500 (Home X axis maximum, go until reaching the end stop.)

G92 Z142.4 ( ** Set Bed Height ** )

G92 X-75 Y-75 (set zero for X and Y)
(**** end homing ****)

M108 R8.0 (Extruder speed = max)
M6 T0 (wait for toolhead parts, nozzle, HBP, etc., to reach temperature)

G1 Z10 F500 (Bring bed up)

M101 (Turn on Extruder)
G04 P8000 (Wait for 8 seconds for flow)
(**** end of start.txt ****)


If I feed just this file into my printer, it will heat up the nozzle, bring the bed up to about 10cm below printing height and once the nozzle is at temperature, it turns on the extruder for 8 seconds.

Your printer will likely be different to mine - there are a few different flavours of GCODE and you will likely have different XYZ positions, so take a look at some GCODE generated by your own slicer and identify the different parts. The principle is the same.