How do shells get their shapes? These are the forces behind their twists and coils

How do shells get their shapes? These are the forces behind their twists and coils