You can find badges as loot drops in the campaign, opening crates, and completing trials. You can also buy badges from the market and shops. You can see where to find a specific badge by tapping on that item on your Hero screen.
Some badge need you to collect plans and plan bits in order to craft the badge.
There is a Badge Bazaar where you can buy badges for your Heroes using Badge Tokens.