You will typically the enrolled in Part A when you turn 65. You are eligible for Part A based on 40 quarters of taxes paid into Medicare. You could also enroll before turning 65. Those under 65 and have a disability or end stage renal disease.
I would enroll in Medicare Part A even if you are still working and covered by your employer's group health plan. Part A is used primarily for an inpatient hospital stay and it is free. It probably won't pay much towards a hospital stay because the insurance through your employer is primary. I think most employers would want you to enroll in Part A when you become eligible.
Part A is free due to the time mentioned above.