What stops a pilot from flying VFR and going IFR?
You are confusing VFR, VMC, IFR and IMC.  Let’s briefly define the terms before I attempt to answer your question:

VFR – Visual Flight Rules.  The pilot navigates at will, but must comply with cloud clearance and airspace requirements.

VMC – Visual Meteorological Conditions.  The weather is good enough to operate under VFR. 

IFR – Instrument Flight Rules.  The pilot must file a flight plan with ATC and be cleared for the altitude and route flown.  This defined and regulated process is required under IMC, but can also be followed when the weather is clear.

IMC – Instrument Meteorological Conditions.  Weather conditions are poor enough that operation under IFR is required.

So to answer your question, if an instrument rated pilot is operating under VFR and finds him or herself unable to maintain VFR cloud clearance requirements, (i.e. the weather is no longer VMC) then they should contact ATC immediately and request an IFR clearance.  By definition it is not possible to fly under IFR without the knowledge and consent of ATC.  

And yes, it is possible to fly into IMC without ATC's knowledge or a clearance, but it is neither safe nor legal.  It is unsafe for the non-instrument rated pilot because of the extreme likelihood of spacial disorientation, and for both because of the risk of loss of separation from other traffic.  An instrument rated pilot would of course be able to rely on their skills to penetrate a cloud safely, but it is not something that can be done at pilot's discretion as you suggest.

I am guessing that the origin of your question is what we call “inadvertent IMC”.  In this case, instrument rated or not, the pilot should fly by reference to their instruments and execute a level 180 degree turn to exit the cloud.  This is an emergency situation.