Not sure if this is a hardware or software problem so I have posted it in the Mac software section as well:

Every now and then over the past couple weeks, my macbook has been doing this thing where a screen will suddenly split into two parts and the part on the right will be on the left hand side and the left hand side will move over to the right. The computer will freeze and I have to manually shut it down and restart.
Has anybody ever had this happen to them? Any ideas to fix this?