If you purchased AppleCare+ then I have good news for you - you're covered for up to two incidences of accidental damage. It'll cost you $79 per incident for the iPhone or $49 per incident for the iPad, which is pretty reasonable.
Other warranty or insurance
Check to see if you have some other warranty or insurance covering your device. You may have taken out an accidental damage warranty when you purchased the device or might have a home or business insurance policy that covers it.
Don't have AppleCare+? Take your device to Apple for a repair estimate. It'll cost more than an AppleCare+ repair, but it'll get you up and running fast.
Most major cities have repair centers that will handle iPhone and iPad repairs, which you can find with a quick Google/Bing! Search. Alternatively you can search for a repair tech through a site such as iCracked. Some of these firms offer fast turn-around times if you're in a hurry (for a price), and some will even visit your home or office to carry out the repair.
Alternatively you could try a mail-in repair firm. Again, Google or Bing is your friend.
Repair it yourself
Grab a screwdriver and visit iFixit for all the info, parts and tools you need to fix your iPhone or iPad. As long as you have patience and can follow instructions you can (with the right tools and parts) fix most problems affecting your iPhone or iPad. I suggest that you read through the repair process before buying the tools and parts you need though, so that you know what's involved before committing.
Alternatively, find a friendly local geek/nerd who's willing to do the job for you for a few bucks. I've known of a lot of people who've had their smartphone or tablet repaired by the son or daughter of a friend or family member (A word to the smart kids reading this: If I were a kid now, I'd totally get into repairing smartphones and tablets for friends and family and rake in the bucks!).
If you don't have AppleCare+ and you don't want to spend the money on a repair, then what have you got to lose by at least taking it apart? After all, you iDevice is broken either way! But I warn you that prices vary considerably. While you can pick up a display for an iPhone 4S for about $40 (tools included), a display for an iPhone 6 Plus will set you back over $350.
Buy a new iPhone or iPad
Not the best or cheapest solution, but if your device is a few years old then this might be the best options.
Also, remember that you can sell your old, broken device on eBay (people buy them for the arts). Just be clear about what the damage is and you can get some money back to put towards your new device.