Random fx's how do they do it?

it seems its alot of experimenting but it seems some basics are needed, how do people come up with them, it seems to be alot of math too lol