hai guys. im new in arduino so please forgive if i have something wrong while i post it

so the real probelm:
im just want to know how actually "random function" on arduino work .? how it can randomly choose something ? (example we set "random(1,9)" and it can randomly choose number from 1 - 9) anyone please explain the random function?
thx for your support
-galuh boy-
