You have seen Rundll32.exe as a process and also as a malicious program, the following article will help you understanding it.
There are huge collections of DLLs (Dynamic Link Libraries) in our system that is responsible for storing application logic in the computer. There is no genuine way to launch the required .dll file in the computer memory so it is for this purpose the Rundll32.exe process is used.
Why is it necessary?
In simpler words, the rundll32.exe process is responsible for running DLLs and placing its libraries in the memory. Rundll32.exe is used to run program code in DLL files as if they were within the actual program.
Rundll32.exe is also registered to be a backdoor spyware that can cause the system to perform vulnerably. This is how you can distinguish between the two:
The genuine process is located in Windows\System32\rundll32.exe but if it is a spyware then it would run with the same name but from some other folder location.
Rundll32.exe is recommended for the proper functioning of the computer but you can still disable it from the startup tab in the msconfig utility.