1- what exactly is iray, what is it used for, and what happens if I do not use it. Let me put it this was what if I don't get nividia graphics card and use AMD.
When you have created a scene with an environment, chars, etc, you must make an image (rendering) with it and that is exactly what does iray.
Rendering is a complex and compute intensive process as you have lights that will generate rays; These rays will fall on objects and be reflected to other others objects to create new rays, and so on, and all these reflections must be taken into account for a realistic render. Also some objects like skin partly absorb the light and diffuse it evenly in the space. Others like water are partly transparent but the lightrays are deviated. And so on. That is what makes rendering complex and requires a powerful computation engine. And even with a good GPU a render can take from 10mn to 10 hours, depending on the scene complexity, expected quality, etc.
The best for iray is to use a GPU (nvidia only) but iray can also be used on a CPU, with a significant slow down (say 5x).
There are alternatives to iray. 3Delight is the previous rendering engine of Daz Studio and it is still present in DS. It relies on much simpler methods, the rendering time is much smaller and no GPU is required. But the rendering quality is also quite degraded. Some assets are iray only but DS can convert them before rendering (but not perfectly).
Iray is made by nvidia and only tier GPU are supported. Other 3D programs like blender can also support complex rendering with either nvidia or AMD GPUs.
2- what do you recommend in terms of hardware for hobbyist who are just looking to play and just create characters for fun and not for content creation.
It really depends on your budget. Hardware for 3D is expensive. IMO the most important is to have a large amount of memory on your computer and on the GPU. Objects surfaces are covered with an image (a "texture"), the images are of high resolution to provide a realistic render and all the textures of all the objects must fit in the CPU and GPU memory. If your GPU memory is not large enough the CPU will be used. If you CPU memory is not large enough DS will crash.
What you must NOT buy is a GPU with a small memory (say <=4Gb). You will not be able to render any scene but the simpler ones, cannot have more than a couple chars, etc.
What you must NOT buy is a GPU with a large memory AND a computer with a small memory. If the CPU memory is not at least 3x as large as the GPU memory, DS will crash for most complex scenes and your GPU will be unused.
After that it is up to you and it depends on your budget.
I would say a decent configuration to use iray would a GPU with 8Gb memory or preferably 12Gb, and a computer with 3 times the GPU memory (say 32Gb). With that you can render a scene with say 3 (maybe 4) chars and a complex environment.