How do airports with no ATC operate?
I will answer this for the regulations and general procedures in the USA as laid out by the FAA, operations may vary elsewhere in the world. AOPA publishes a nice guide on how traffic flow at un-towered/un-controlled fields works and I would advise giving it a read as it covers a wide variety of scenarios. Effectively planes self announce and monitor radio traffic as they approach and depart the airfield.  

Basic right of way is established in FAA FAR 91.113 and provide guidelines for operations. While some more specifics can be found in FAA FAR 91.126 and FAA FAR 91.127 relating to un-towered/un-controlled operations specifically. 

Ill provide a brief example of a departure and approach (as would be heard on the radio over the Common Traffic Advisory frequency "CTAF"). You as the pilot in command are always responsible to "See and Avoid" so you should always have your heads up on approach to a field looking for traffic. 


  
  Plane is started and taxied to the run up area, checked, and lined up at the hold short line with out making any calls. You simply look around while taxing as you would when driving a car. The only exception to this is taxing on the actual runway which requires a "Piper Archer Back Taxing 05" call. 
  (check downwind, base, and final for incoming aircraft as you monitor the radio for calls)
  (when you see its all clear) "Piper Archer taking 05 for a Northbound departure"
  Enter the runway, make sure its clear, takeoff
  Follow any procedures that the airport may have (noise abatement etc.)
  "Piper Archer departing the pattern to the north"
  


Then for a basic arrival you should fly the standard traffic pattern as outlined in the AF/D for the given field.  


  Tune radio to CTAF and listen in if no one else is making announcements you can begin yours. For the most part everyone will make the following announcements or a similar variant there of. 
  
  "Piper archer 5 miles to the north, inbound for a landing on 05"
  
  "Piper archer entering left downwind for 05" (General procedure calls for entering the traffic pattern on the downwind leg)
  
  "Piper Archer turning base for 05" 
  
  "Piper archer turning final for 05" 
  
  Land 
  
  "Piper archer clear runway 05"


Some points to note. If you hear calls of others in the pattern you can still enter. Generally you want to be 1 or 2 legs behind the plane in front of you. This varies depending on what you are flying and what they are flying. For example I was landing one day in my Archer and a Seneca was inbound behind me but close, him being the heavier and far faster aircraft I let him in. Over the radio I allowed him to overtake me (I extended my downwind for him) since he was the faster plane I did not mind having some extra time to set up my approach. 

On short final you should always be checking to make sure that no one pulls out onto the runway or that no one is departing. At an un-towered field dont be afraid to go around!

As Ron mentions in the comments below, there is, strictly speaking, no regulation requiring you to have a radio on board for VFR flight. That being said some older planes that lack full electrical systems also subsequently lack radios. Many have hand held units on board but again are not required to. In this case they must observe the traffic flow and enter the pattern in a safe manner, this is why you should always have your heads up looking out for aircraft doing this. 


  wouldn't there be factors like weather which can cause accidents?


At both big and small airports weather is handled similarly. If the conditions are VFR then a visual approach is conducted and you can avoid other aircraft by simply seeing them. The scenario above is a standard VFR arrival and approach. If the weather calls for an IFR approach and and you are in an IFR equipped aircraft and furthermore the field has an IFR approach into it (be it RNAV or GPS etc.) you may conduct an IFR approach into the field. In this case you will make calls at the proper call out points on the approach (similar to a VFR call out). Since you cant physically see the other traffic in this case radio monitoring is key.