What to do for a kidney stone immediately?

See the doctor. Pain management and good hydration is the key sor small to moderate stones.
Hydration first! The size of the stone does not correlate well to the intensity of the pain. The nearly unbearable pain of "ureteral colic" is from spasm of the muscular ureter. Although 50% probability to pass on its own within a few days, a 6mm stone sometimes will get stuck and fail to progress. Usually after 5 days, i recommend having the stone extracted with a ureteroscope as an outpatient.