"Light lag" prevents sensing in real time at great distances. A ship firing its thrusters at the Charon Relay can be easily detected from Earth, 5.75 light-hours (six billion kilometers) away, but Earth will only see the event five hours and 45 minutes after it occurs. Due to the light-speed limit, defenders can't see enemies coming until they have already arrived. Because there is FTL travel and communications but no FTL sensors, frigates are crucial for scouting and picket duties.
Passive sensors are used for long-range detection, while active sensors obtain short-range, high quality targeting data.
Passive sensors include visual, thermographic, and radio detectors that watch and listen for objects in space. A powered ship emits a great deal of energy; the heat of the life support systems; the radiation given off by power plants and electrical equipment; the exhaust of the thrusters. Starships stand out plainly against the near-absolute zero background of space. Passive sensors can be used during FTL travel, but incoming data is significantly distorted by the effect of the mass effect envelope and Doppler shift.
Active sensors are radars and high resolution ladars (LAser Detection And Ranging) that emit a "ping" of energy and "listen" for return signals. Ladars have a narrower field of view than radar, but ladar resolution allows images of detected objects to be assembled. Active sensors are useless when a ship is moving at FTL speeds.