If you're a new student pilot, you must get at least a third-class medical certificate from an Aviation Medical Examiner (AME). One of the requirements for BasicMed is that you have held a medical certificate in the recent past.