Yes, epoxy is waterproof once it has been cured and hardened.
Epoxy is typically a reference to epoxy resins which are commonly used in glue, plastics, paint, coatings, primers, sealers and flooring.
There are so many different varieties of epoxy that whether or not it is waterproof depends on what it was designed for, while most epoxy is waterproof not all epoxy is designed to be exposed to water.
Epoxy can take a long time to dry, up to a week or more, especially if it has been used to finish a floor as large quantities are used.
If you give the floor insufficient time to cure it will result in a poor finish caused by solvent entrapment.
It may also not be fully waterproof as solvent entrapment can cause holes to appear in the resin.
If the epoxy is used on a surface that is in poor condition or is prone to movement then there is a good chance that the epoxy will crack and allow water through.
Epoxy cures hard so if the surface it is on cracks or moves then it is also likely to crack and allow water through.
It is possible to get flexible epoxy which is ideal for waterproofing surfaces which are prone to small amounts of movement such as wood.
If you are waterproofing a hole or crack using epoxy it is important to ensure that you get good coverage, a thin veneer of epoxy will not be enough to waterproof something long term as it will quickly fail.