As long as the old device is still working, there are a few ways. If the old device isn't working, however, then you can't get them off it.
1. You can save them to the phone as a file. Then send the file to yourself via email and install it on the new phone.
2. Sync the contacts to a google account and then download the data to the new device from said google account.
3. Do the same as in #1, but uploading the file to google or other cloud account and then download to new phone.
4. Do the same as in #1, but instead of uploading the file, connect to a computer via USB cord and copy the file to the computer. Then connect the new phone to the computer via USB and move the file to the new device.