Pipes are simple in shape, but highly complex in behavior. When performing pipe stress analyses, also known as flexibility analyses, it is important to understand the various types of stresses that the applied loads and pressure give.
For example, the pressure generates Hoop stress and axial tension in the pipe. Loads from weight, earthquake, thermal, etc. will generate forces and moments, often (not always) it is the bending stresses together with the axial stresses that are dimensioning.
This is just the very basic because it is also important to understand which loads are force-controlled and which loads are strain-controlled.
Then codes such as ASME (The American Society of Mechanical Engineers) B31.3 define acceptance criteria for how to combine the stresses and the allowable stress level of the stress type.