Depends greatly on the type of function. Some things to keep in mind: 1.) the value of the denominator of a fraction cannot be zero 2.) the inside of an even root cannot be less than zero 3. The argument of a logarithmic function must be greater than zero 4. Plus many more other rules and such
But a simpler explanation, just find out what values x can be for the given function, and what y can be. The x values make up the domain, the y, the range