Residency programs are approved by accreditation organizations which ensure that the program is meeting their standards. This includes number of hours spent in teaching, number of full-time and part-time faculty members, and other things that have been deemed essential for quality graduate medical education.
The ACGME (American Council of Graduate Medical Education) is one of those organizations. When a program is ACGME accredited, it at least meets the minimum standard for continuation of education for graduating MD students. Programs try very hard to maintain their accreditation and a program that can't consistently meet the requirements can have the accreditation denied, which effectively shuts down the residency program and looks very bad for the department as well as the hospital.
The AOA (American Osteopathic Organization), among its other roles, is the central accreditation body for the exclusively osteopathic residencies. Its role is similar to that of the ACGME in this regard. It has been argued that programs with only AOA accreditation are the ones that would not be able to meet the more stringent ACGME criteria, but I won't go into that here.
AOA also refers to Alpha Omega Alpha, the very prestigious honor society for outstanding students in US MD programs.
The AMA (American Medical Association) does not have any role in the accreditation process. Usually when a person speaks of an "AMA program" they are a misinformed student 😀
I hope this is helpful to you.