An inguinal hernia is typically diagnosed through a physical exam by a healthcare professional, although imaging tests may be ordered to confirm the diagnosis.