Now that’s into the whole exciting discussion about tracking.
Imagine a turret on a real world naval battleship: big guns in a slow moving turret. You’ll hit big slow moving targets well. Then you have a smaller ship that is moving quickly a fair distance away, but still in range. It’ll just be “harder to hit” because it’s smaller - but when you do hit it he’s finished.
If he goes close to you “under your guns” and is circling your faster than your turret can turn then you are almost never, except by pure luck, hit him.
This is why real life battleships - or their equivalent - have smaller guns in faster moving mounts to deal with the irritating small stuff. And why you operate in fleets so other ships can be tasked with protecting the big ships.
There is a similar issue in Eve, those nice big slow tracking guns can’t hit smaller targets that have high angular velocities. It’s why most (if not all) battleships and cruisers have drone bays that can deploy a flight of medium or light drones to use against stuff that got under your guns.
Different gun types have different tracking. The long range guns (rail guns, beam lasers, artillery) track more slowly than the equivalent short range guns (blasters, autocannon, pulse lasers).
Within each gun “type”, such as Medium Beam Lasers, there will be typically three variants - one longer range, lower tracking, one short range but better tracking, and one middle of the road. Damage tends to be roughly equivalent but for the effects of tracking and range. In the case of Amarr Medium Beams they are Heavy (range), Quad (tracking) and Focused (balanced) respectively. The discussion of the merits of each is long and probably results in a shouting match. Horses for courses and personal preference.
Of course the different turret types aren’t the same - Beam Lasers track better than their equivalent Artillery Turrets, Pulse lasers track worse than Autocannons.
And then there are Tachyon Beam Lasers. The heaven help us weapons of the Amarr - more like Artillery but with big fitting requirements.
It’s complex. And a whole area of pilot choice and preference.
The ubiquitous Eve University link:
https://wiki.eveuniversity.org/Turret_mechanics#Tracking
Few pointers:
This is not a reason to mix your guns.
Advanced ammunition changes your tracking. For example Scorch increases damage at range for pulse lasers but reduces tracking.
Things that improve tracking are useful, as are things that slow a target down.
Some hulls have tracking bonuses (Apocalypse) - surprisingly effective.
Your own movement influences how the guns track targets - you can hit a casing target more easily than an orbiting one.
You’ll get used to all this with time.
Also: I nearly added to the earlier replies:
Energy Turrets have a zero second reload so you can change ammunition to match the range rather than being tied to one range/damage pair because of the reload time penalty.