Microsoft Classroom Pen or the Surface Pen with two side buttons
Unscrew the top of the Pen from the bottom.
Replace the AAAA battery with the positive (+) end of the battery pointing toward the writing tip.
Screw the top back on.
There are also two button-cell batteries in the pen cap that may need to be changed. To learn how to change those, see The light on my pen is blinking red or doesn't turn on in Troubleshoot Microsoft Surface Pen.