Lots of different perspectives on this topic. First of all, what type of fish and what type of reef are you specifically asking for.
For speckled trout, most reefs are soo big on the gulf coast that you're going to have to end up being on it (drifting over and on top of it) to work the entire thing. The fish are mixed into the oyster shell.. Sometimes they are on the edge but you just have to figure that out. The trout will move all over the reefs. On the smaller reefs where there is a defined edge and top and you can cast to both.. typically you will be off the reef in deeper and cast to the top of it and bring your lure down the edge of it and past the edge. Sometimes they will sit off the side / edge where it's broken oyster and mud.
approach the reef on trolling motor or drifting, not on the big motor. look for signs, slicks or bait. if you have either slowly move in working the area. it's all about reading the water and hunting them out. if there are no signs, drift and troll around a little, if it doesn't produce move on and repeat. :texasflag
It depends a bunch on the reef. There are many different types of reefs and they all fish a little different.
In shallow water stay back off of it and throw up to it and work your way down and around it. If it is shallow enough to wade around it that's your best option. When you walk on a reef in shallow water you will likely run the fish off. You can also drift or troll up, anchor out away from it and cast up to it.
In deeper water if the reef is a big high reef with a ridge that you can't drift over and that is too deep to wade out off of it then you may have to either wade up on the reef or anchor out from it and cast up to it. On deeper reefs like that I usually find fish out on the edges where it goes from heavy shell to scattered shell and mud. Especially on the ends of the reef. If you think about it a reef is going to block and redirect current flow. It may be very subtle but that is what happens. Because of that fish often congregate out on the ends of the reef where the water is flowing around it. Now, if you have a reef that has a high ridge and you get an exceptionally high tide the fish may stack right on top of the ridge of the reef and you may do well casting down the reef and across the ridge working your bait back over it.
On deeper water reefs that don't have a high ridge I usually just make drifts over them.