This could happen due to faulty hardware or bugs in the operating system. However, since you can't diagnose this all by yourself, the solution comes from a phone service. If it's a hardware problem, the entire touchscreen needs to be replaced and it costs approximately 1/4 of your phone.