It really depends on the size and type of said jellyfish. Most jellies will eat zooplankton(artemia, krill, mysis) and small fish. Larger jellies will obviously eat bigger fish as well as some inverts like shrimp.
Some jellyfish however like the upside down jellyfish have zooxanthellae living inside of them. Zooxanthellae is a type of algae that is in many corals as well that shares a symbiotic relationship with its host. Its given a safe place to go and in return, it feeds the host with the extra zooxanthellae it produces. So upside down jellies produce their own food. (though they still catch passing zooplankton with their tentacles)