How to get star heroes
Right from the beginning of the game, you'll earn a random hero, but you can reroll for a different, random hero. You've probably seen references to rerolling but are unsure what it means. Make sure that you log into the game as a guest, NOT on Game Center; if you have already logged in via Game Center, log out and log into a different account. Then delete the app, reinstall it, then roll again. Keep rerolling until you get a better hero; three-stars and four-stars are possible. On Android, change your settings for games so that they do not auto-log into the game when you play them before firing up Injustice 2 for the first time.
Gems are the premium currency of the game and are available for purchase, but you can also get plenty of them for free. Use your gems to purchase hero chests, especially early on in the game. Hero chests give you a random hero, with a fairly decent chance at a three-star hero. If you get a duplicate hero, you'll get hero shards instead. Another way to go with the gems is to grind in the store for specific hero shards. Can get expensive, but do this and you can be sure of what you're trying to unlock.
Hero shards are used for upgrading a hero's star ranking. Go to the hero's profile and you'll see how many shards you need for the next upgrade underneath the star ranking. Once you max out the shard count, you will be able to upgrade your hero's star level. Consequently, once you have enough shards to unlock a rare locked hero, you'll be able to unlock them.
Hit the arena and battle it out in exchange for arena points, which earn you new rewards, including locked heroes. Be sure to use only one hero at a time and to round to the nearest 2,500 or as little above as possible (e.g. as close to 2,501 or 2,502 as possible without going below). Each hero comes with 5 pips per day, which is arena energy, so you can fight 5 battles with one hero at a time for 15 battles with three heroes, or you can fight 5 battles with three heroes at a time and blow out all 15 of their combined pips in one shot.
If you want to spend your gems for the future, go to the objectives and upgrade them like crazy to increase the chances of earning objective gems. Upgrade them high and you'll find yourself earning 30 gems from random short operations and 100 gems from random long operations. You can also earn hero shards from the operations themselves, as well.