Niallo,
The manufacturer of the aircraft type (for example Airbus) are the ones who originally determine how an aircraft can be operated. This is formulated based on design and engineering, among many other things.
Therefore to put it very simply the OEM gives envelopes that an aircraft can be operated for any given scenario. The flight crew has discretion to operate within those envelopes.
The OEM also gives instruction on how the aircraft is to be maintained, parts that are approved to be used on the aircraft, and basically every circumstance that an aircraft would encounter during its operational life.
The regulator approves those instructions and the operator then operates the aircraft in accordance with those approved instructions.
This is a simplified basis of how it works.
GB