Why would a window air conditioner keep freezing up?

Most 2 probable answers are the filter or coil the filter is suppose to keep clean is dirty - shine a light in the coil and see. (2) It is low on refrigerant and has a leak. There are other conditions but I am assuming you are hot and the outside temp is also.