There are dozens of concepts in Monster Hunter: Wilds that the game doesn't explain it in much detail (it would be overwhelming otherwise), so hunters have to rely on intuition or shared knowledge to understand what is going on. One of such concepts is affinity, a stat on all weapons. It is not as important as the Attack power, which is pretty easy to understand, but it can be helpful to decided which weapon you want to carry to battle.
In short, affinity in Monster Hunter: Wilds is the chance of striking a Critical Hit with your weapon. A critical hit is a hit that deals 25% more physical damage than other attacks. Weapons usually have a 0% affinity rate. If they have, for example, 10% affinity rate, you have a 10% of having a critical hit.
But if you have a -10% affinity rate (it is possible to have negative affinity rates) one of out ten hits will deal 25% less damage. Sometimes negative affinity is the price to pay for larger raw attacks, so it's up to you to decided what you prefer...
You will know when you have hit a affinity hit when you see a small star under the damage numbers. Affinity only affects Physical damage, not Elemental damage (Fire, Water, Ice, Thunder, and Dragon, which is added to the physical damage depending on the monster's weakness).
Some weapons might come from the start with an affinity rate. Sometimes, you will see seemingly similar weapons, with the same Rarity and Physical raw power, being differentiated only by the Elemental damage they or the Affinity level. However, you can improve you affinity by using some skills.
The main skill you should be looking to if you want to increase affinity right away is Critical Eye, that can increase affinity from 4% in Level 1, to 20% in Level 5. Other skills can increase affinity on certain conditions, for example:
There are even some skills that, while not increasing the affinity, benefit from landing critical hits, which only affects if your weapon has affinity. One example is Critical Status, that increases abnormal status effects when landing critical hits.
Beware that you can't directly use Skills: instead, they come with Weapons or Armor, as well as Decorations (which can be crafted talking to the Smithy Gemma or crafted in the Melting Pot in Suja) and Talismans.