The flange bolts or studs pass through both flanges and the valve lugs--none of these holes are threaded--and engage nuts on one or both ends.
If the valve lugs are tapped, shorter bolts can be used from each side, attaching each flange independently. The advantage of this is that one flange can be removed while leaving the valve attached to the other.
__________________
In vino veritas; in cervisia carmen; in aqua E. coli.