Triangle problems in extremal graph theory