You'll have to be a little more specific as to what you mean by weird things. Fixing the problem might be something as simple as performing a soft reset (removing/reinstalling battery) or it could involve a process that returns the phone back to store bought condition (hard or factory reset).
Try booting in safe mode (power off, press power button until you see Samsung logo, then hold the volume down button. Do not release the power down button until it boots. You'll see "safe mode" in a box in the lower left hand corner of the screen) or if that doesn't seem to help, perform a hard reset. Go to Settings-->Backup and Reset-->Factory Reset