It's really difficult to have any idea how to diagnose this based on the information you've provided. There are thousands of people using Elementary OS without this problem and probably quite a few on very similar specs. The best thing you can do is to run
dmesg to check what's wrong, just run it in a terminal. When the system freezes, you can also hit ctrl+alt+F1 to enter a tty, and run
top to see if a process is hogging your CPU, maybe try restart pantheon (window manager) to see if that helps clear it up.
Short of the above, you should ensure that your drivers for your graphics card are installed correctly, and that you're only using applications which are built for your version of the software.
I know this isn't strictly an answer, but the question is very open ended and impossible to answer - I wouldn't be able to fit this information sensibly into a comment. If you find something interesting in dmesg, or if you find that restarting pantheon itself helps, drop a comment on this answer and I'll try provide more information for how to isolate the exact cause.