If your iPad in non-functional, is damaged, or has any screen defects at all, its trade-in value will almost certainly be zero; the cost of repair will almost always exceed any potential trade-in value.
As for Apple's trade-in process, you can either trade-in and obtain credit against the a new purchase - or you can take the agreed trade-in value as an Apple Gift card that can be used against a future device purchase of your choice, or as payment for Apple services (e.g., AppleTV+, Apple Music etc.).
If the trade-in process is completed in-store, the item will be immediately assessed and a trade-in value agreed in-store. You then have the choice of instant in-store credit to spend in-store - or, as already mentioned, you can accept an Apple Gift Card of the same value.
Online trade-in is handled differently. An estimate is first obtained online - and the item returned to Apple's trade-in partner for assessment. When received, the item is assessed against the description that you provided - and the trade-in value adjusted if appropriate; you will be informed of any adjustment due to damage or other defects. You can then accept or reject the final offer; if the offer is accepted by you, the agreed value is returned to you as an Apple Gift Card - or, if the trade-in was initiated during an online purchase, the value is returned to your payment method.
You can obtain verify eligibility for trade-in and obtain an estimate of value here:
Apple Trade In - Apple