Have you tried taking out the battery and putting it back in after 30 seconds. You can also try a soft reset by holding the power button down for about 10 seconds to reset the device if it has fatal errors or hang-ups, or freezes. This will restart your Samsung Galaxy S Duos 2 S7582 Android phone.
If these options do not work and if you aren't to worried about losing the data on your phone you could do a factory / hard reset.
Turn off your phone and take out your sim and SD card.
Next press and hold volume up key + home key and power key.
When the samsung logo appears release all keys.
Now you will see an android robot.
Select " Wipe Data / Factory Reset " option by using volume key.
Press Power Key To Confirm.
Now select " Yes ----- Delete all user data " and confirm.
Select reboot option.
You may also want to open the phone up and check its digitizers connection and cable. They may have become loose or damaged somehow. It sounds like a reset should solve the problem but if not then you may need to replace the digitizer which is the part responsible for sensing touch and relaying it to the CPU.