If you buy an iPhone via the iPhone Upgrade Program it includes AppleCare+. See: iPhone Upgrade Program - Apple
Otherwise you get 1 year of limited warranty and 90 days of tech support. You can extend that to 2 years with AppleCare+. See: AppleCare+ - iPhone - Apple