It is best not to cut holes in floor joists, but when you must there are some important rules to follow.
Never cut into the top of the bottom of the joist. If you do the entire joist is now no stronger than the wood that is left.
Always cut holes in the centre of the joist, closer to the supported ends than to the centre of the span. You must leave 2 inches wood on the top, and two inches wood on the bottom and the cutout should not be more than 1/3rd of the total width.
Some manufactured I beam type joists have knock-outs pre stamped in the centre area for pipes and wires.