I'm writing this in-between study breaks, so I'm going to do it in bullet points to save time.
1 - Usually, people do research years between M2/M3 or M3/M4. I'm not sure about doing it between M1/M2, so if you want it that way you'll have to check with your med school on their policies.
2 - Make sure you and your PI have a project planned, including the specifics, like your hypotheses, experimental design, etc. Also, talk to your PI about what kind of year-long funding they have or recommend for you. Some funding comes from different sources depending on if you're doing lab or clinical research, so your PI might have a certain fellowship grant they want you to apply for.
3 - Along the lines of funding, it's generally better if you can get a fellowship (HHMI, NIH, Doris Duke, Sarnoff, or something similar) because that has more prestige than just taking a year off, so you might want to apply for those. The applications are usually pretty long, so you should read up on the requirements and plan out who to ask for LORs, and start writing your personal statement and research proposal. You don't want to be writing those during school if you can avoid it, so it's better to start early and get it out of the way so you can focus on class. Applications are usually due in December or January.
4 - Come up with a backup plan in case you don't get the fellowship you applied to. See of your PI has funds that they can use to support your year off if you don't get a fellowship. I thought this funding business was nonsense at first, but apparently funded looks better than non-funded research.
5 - Talk to your dean or someone at your school to let them know you want to take a year off and are applying to these fellowships. Ask them what paperwork you will need to do. Also ask what their process is for getting a leave of absence. Some schools have committees that review requests for leave of absences and it usually takes a while for those committees to get back to you. Some schools may just need you to fill out a form and that's it.
All in all, start talking to people now and planning things out. A lot of these processes take a long time, like waiting for LORs, waiting for your fellowship application to get back to you, or waiting for the school's approval, so make sure you keep track of when applications open and deadlines. Good luck!