EDITEDIT: I'm trying to make my first combat ship, but I don't know what the difference is between a search sensor active sensor and a missile fire control active sensor. Which one do I need? (I suppose I need one big sensor for ships and a small one for missiles right?)
The way combat works, in brief.
To target an enemy ship it must be detected by active sensors, which means you need an active search sensor which can detect the target at least to the range you wish to fire. Active search sensors are 'tuned' to a specific size (called the resolution) which they will detect best, so if you know what size your enemy's ships are you can tweak that somewhat for better results.
The active sensor feeds the location data to the missile or beam fire control. The missile or beam fire control must be able to handle both the distance of the target being fired upon and (for beams) the speed the target is moving, so again if you know how fast your enemy's ships move you can tweak this to be more efficient.
Fire control then feeds targeting data to the weapons assigned to it.
In the case of beams, the weapon also must be able to handle the range and speed of the target. If the target is significantly faster than the weapon's tracking speed, you will have accuracy issues. Fixed mount beams (those not in a turret) have a tracking speed equal to the ship's speed while turret mounted weapon tracking speed depends on the gearing ration and speed you enter when designing them.
For missiles, all you need to do is ensure the target is within the missile's max range and
keep the target in your active sensors. The missile will attempt to intercept the target and asplode all over it with nukings. If you lose active sensor data for the target, your missiles will self destruct unless they have sensors on the missile itself. In that case they will continue to the last known position and then seek out enemy targets. (For missile with sensors you can fire them at waypoints and have them seek their own targets, or just dump them out of the ship with no targeting data and they'll find enemy ships within range.) Missile intercepts also depend on speed, with your missile point allocation to engine, maneuverability, etc controlling what chance the missile has to intercept targets moving at various speeds. You'll see that on the missile design page.