The mid 2010 Mac Book Pro can upgrade to either El Capitan or the newer macOS High Sierra.
Please use Safari to access the following links do not use Firefox
How to upgrade to macOS High Sierra - Apple Support
How to upgrade to OS X El Capitan - Apple Support
Before upgrading make a full back up of your Mac.
Check that third party apps you use have updates available for the new OS.
https://roaringapps.com
Check that your printers/ scanners etc have updated drivers and software available for the new OS.
Connect your mac to your router via cable rather than rely on WiFi.
Do not use your mac while it is downloading
and do not use any other devices that share the same internet connection.
If the App Store says Open then it is detecting a previous download of the install app
go to the Applications folder locate Install macOS High Sierra.app.
Move it to the Trash, empty the Trash.
Restart, click on the link again, the App Store should say ‘Get' or 'Download'.
High Sierra will download the Install macOS High Sierra.app directly to your Applications folder.
If you wanted to upgrade to El Capitan it does things differently.
When the link opens go to Section 4 and click on Get OS X El Capitan.
Go to Section 4 and click on Download OS X El Capitan.
This downloads InstallMacOSX.dmg to your Downloads folder.
When downloaded open to InstallMacOSX.pkg, double-click on
that and an installation window will open, this does not install El Capitan
but converts the InstallMacOSX.pkg to the Install OS X El Capitan.app which
you will find in your Applications folder, it should be 6.2GBs in size.
If the installation window asks which disk you want to install to, you must pick
the disk that you are booted to at the time. Not any internal or external disk that
you want to eventually install El Capitan on, that is for later.
To start the installation of El Capitan double click on the Install OS X El Capitan.app.
If you use the Install macOS High Sierra.app or the Install OS X El Capitan.app in the Applications folder
to install the OS these installer apps automatically self delete on completion of the installer.
Therefore if you ever need to reinstall these OS's you would need to download the OS again or
put your faith in Apples Recovery Servers.
There are two things you can do before going ahead with the installation.
Make a copy of the installers app and keep it in a safe place on an external drive or similar.
The other method would be to make what is called a bootable USB stick installer.
A 8GBs should be fine. With the installer app for whichever OS you want in the Applications
folder read the instructions here,
How to create a bootable installer for macOS – Apple Support
Once it is created label it appropriately and keep it safe somewhere ready for an emergency
should it arise.