I was told I have a 2 mm or CM I can't remember kidny stone they said its non obstructive but I still feel the pain in my back how long till its gone?

Variable. Many kidney stones will pass, but not all. You should be followed by a urologist. If the stone remains, it may need to be treated with ultrasound to break it up. (probably 2 mm - a 2 CM stone will not pass - that is about 8/10's of an inch!).
Until comes out. If it is the cause until it comes out or smashed by lithotripsy.