The Rim Lock or Bead Lock as they are sometimes called basically bolts the tyre to the rim to stop the tyre slipping on the rim. They are only used on dirtbikes because of the lower tyre pressure required on a dirtbike (some old road bikes had them). It the tyre slips on the rim this usually brakes the valve stem away from the tube leaving you with a flat tyre and unrepairable tube.
The rim should have the its size stamped into it. If you cant fine the size a dirtbike front and pitbikes front and rear will use the 140/160 size. A 125 2 stroke and 250F usually have a 1.85 rim except KTM often have 2.15 rim on the 250F. A 250 2 stroke and 450 will have a 2.15 rim. Larger trail or old big bore MX bikes often have a 2.50 rim.