First try an SMC reset:
How to reset the System Management Controller (SMC) on your Mac - Apple Support
I suspect that's not going to help, so next purchase a drive cleaning disk. They are about US$5-15 at most home electronics outlets, computer stores and "office superstores" that sell computer equipment. Slot-load optical drives as used on your model MBP get dirty over time and that can stop them from working. In many cases a cleaning disk will restore full function to drives that a professional technician has pronounce dead and in need of replacement.
If a cleaning disk does not fix it, you will need to replace the drive. Fortunately that is a relatively easy repair on the 2010 MacBook Pros.