It sounds like you're inquiring about the development of rebar at RC beam-column connections. Based on my (largely academic) experience, you're likely looking at something similar to this:
A key attribute is extending the beam bars to the far face of the column. Realistically, all connections are somewhere between fixed and pinned, but extending the bars straight to the far column face rather than the near face more closely approximates a fixed condition. This detailing approach also gives the joint the best ductility - critical in seismic applications.
Why bend the bars at all? Because the full tension strength of the beam bar needs to be developed at the near face of the column and this requires a certain length of rebar to be embedded in the concrete. In general, the only way to accomplish this is to hook the bars.
Why bend the beam bars so that they enclose the beam rather than having them stick up and down along the column length? I assume it's to do with avoiding rebar congestion but I don't know for sure. So long as the hooked development length is achieved, it seems like a qualitative preference to me.