Just answer a few questions either in an Apple Store or online (https://www.apple.com/shop/trade-in - Click on Smart Phone icon) regarding the brand, model, and condition of your device. They will provide either an estimated trade-in value or a simple way to recycle it.
If you accept the trade-in estimate in the store, they will give you instant credit toward a purchase.
If you accept it online, they will send you a trade-in kit (at no cost to you) so you can send them your device. Then, once they receive your trade-in device, a team will inspect it and verify its condition. If everything checks out, they will either refund the purchase method you used to buy a new Apple device or they will send you an Apple Store Gift Card via email.
If the condition doesn’t match what you described, a new estimated trade-in value will be sent to you via email. You’ll have the option to either accept this revised quote or reject it. If you reject it, your device will be sent back to you at no charge.