On what facts does countering a champion work? It seems like this is your question which doesn't make complete sense to me but I'll have a go anyways. One thing you need to keep in mind is that those websites are crowd sourced and so are unreliable. Also, keep in mind that when champions are counters there is usually something specific about the champion that counters the other. In low ELO a teemo will likely just try to auto Darius repeatedly taking minion aggro, losing farm, and not try to kite away from his grab. In high ELO Teemo will use bushes to avoid taking aggro and do a lot of hit/run feints so that he doesn't get grabbed easily while poking Darius down and denying him farm.
keep in mind that when champions are counters there is usually something specific about the champion that counters the other. This statement I made in the last paragraph is the most important. As a Poppy player I'll use her for example. One of my biggest counters is Darius. Why does he counter me? Well Poppy has a passive that reduces burst damage. Darius can bleed Poppy which does low damage and doesn't get reduced by her passive. Darius's ult also ignores Poppy's passive since it does true damage. This means that any trades they make Darius will win out because Poppy's greatest tool for reducing damage is negated. After the trades Poppy can't easily walk away because Darius can grab her and prolong the trade even more. This makes it EXTREMELY dangerous for Poppy to try to farm minion waves at all levels. Another example, Poppy vs Irelia. Irelia counters Poppy because she is more of an AA champion who does true damage and can slow/stun. If Poppy is winning in a trade, Irelia gets a free stun to prolong free damage and has an ability that does true damage. Rumble counters Poppy because she can safely burn Poppy with the low amounts of fire damage which don't get reduced by her passive.
I'll look at another specific counter. Everyone knows that Trundle is a counter to Renekton but if you try to fight Renekton as Trundle early you will lose. Early game is simply about focusing on farming/sustaining as Trundle in this matchup. The reason Trundle counters Renekton is that Trundles ult essentially gets stronger from Renekton's ult. Renekton gets bonus health and Trundle simply steals that bonus health along with armor/MR on top of that. If you are the Renekton player going into this matchup and understand the counter you will realize that the first item you want to rush is a damage item. That's because if you get tanky first you are simply spending gold on stats for trundle to steal.
Essentially, in order to counter Poppy you use a champion who doesn't get reduced damage vs her passive. You can apply this to other champions. If they have a strength that is negated or a weakness they can exploit by picking a champion, it's generally considered a counter in a broad sense. Keep in mind that all counters aren't equal though. You might pick a Riven to counter a Gnar.... but a good Gnar player will understand what makes Riven beat a Gnar in lane and focus on negating that advantage to make the lane more even.
Many people will pick a champion against another simply because they want to counter them. The problem with this is that they won't understand what it is about the champion that counters the other champion and the way they play them won't actually be a counter because they don't understand reasoning for the counter.