Ensure it's powered off, but plugged in to a power source. Hold down volume down + power until a menu appears (try volume up if it doesn't work). Use volume buttons to navigate and power to make selections. Find the option for factory reset, and select it. It will ask you to confirm your selection, so do that.
Let it do it's thing at this point, it should only take about five minutes. And when it's done, it should work just fine.
Unfortunately, you will lose all your data, contacts, etc, so make sure you back everything up first.