Fixing foundation crack with repair kits
There's two types of foundation crack repair kits, one of them is an expanding foam type of sealant that fills the crack and prevents moisture intrusion. This will prevent water from getting into the basement, crawlspace, etc.... The other type is a bonding adhesive that actually bonds to the concrete and makes a structural repair while also sealing against moisture. Best bet would be to consult a structural engineer, they can recommend the best way to repair it (Even if you do it yourself), the repair kits are $100-800 depending on the size of the crack, with the bonding agent kits being more expensive.