The short answer is: They have the same main ingredient in the same amount and concentration. The long answer adds: Nothing else in the bottle needs to be the same. So they might be equally effective as the branded, nearly as effective, or less effective than the branded.
It’s much like comparing two different brands of vanilla ice cream. To be vanilla ice cream, it must contain vanilla. But every brand has a different recipe leading to subtle changes in texture and taste. Those subtle differences might affect the most important measurement: how much you like that ice cream. Likely, you have a real favorite, maybe Blue Bell, not just any generic vanilla ice cream.
Branded eye drops must go through a very expensive FDA approval process to get on the market. The reason the generics are less expensive is that they are required only to have the same concentration of the active ingredient. They do not have to prove they are as effective as the brand name. This makes for a difference in price and probable differences in effectiveness. Less effect is important in many patients and critical in some. Because neither you nor I have control over which generic is dispensed to you, control of your problem may vary over time.
Sometimes any vanilla ice cream is OK, but usually your favorite is best. Cost is important; so is proven effectiveness. Choose wisely. If you’re experiencing chronic dry eye though, then make an appointment with your ophthalmologist to determine if you have dry eye disease.