If you have saved your contacts to your Google account they will download to the new phone after you add your Google account to it.
If you have not saved your contacts to your Google account, export the contacts from the old phone as a .vcf file. Import that file to your Gmail contacts online, either from the phone or transfer the .vcf file to a PC and do it from that. Once you have all your contacts in your Google account, resync contacts to the new phone and you're good.
Android since v1.0. Linux user since 2001.