Airliners have radar in the nose, you can see the different colored part of the nosecone on some, that's where the antenna is. It points forward, scanning horizontal, with stabilization to compensate for climbing/descending and the pilots can control the tilt to scan above/below the current altitude.
But it's weather radar, so it mostly sees water droplets (rainshowers, thunderstorms etc), not other planes.
The TCAS system scans for transponders from other planes in all directions, checks their path and altitude and will play audible alerts (it shouts "traffic, traffic!") when there is a potential collision risk. You can use it to see other planes on the navigation display, but you cannot legally call that "visual separation".
If a controller asks you whether you have traffic in sight (they must ask that before they can tell you to follow it for example), you cannot say you have it on the screen. That doesn't count, you have to see it out the window.