Can anyone please tell me how NFT work in games?
Truthfully, nobody knows yet. If you were to ask me personally, the answer would be "they don't", but that doesn't mean people with a financial interest in getting them to work aren't going to keep pushing.
NFTs don't really bring anything to the in-game table tech-wise, their two major benefits are external (the ability to sell ownership outside of the game, and the vague ideal of "decentralization"). Their in-game implementation is mostly based on how scummy the company doing the implementation is.
So, actual in-game implementation can be a wide spectrum. There are two major implementations thus far, though.
Play to Earn.
This is the far scummier implementation. In this case, the game itself is secondary to creating NFTs (and thus hopefully earning money). This can even extend to profiting off the work of others in-game.
Peter Molyneux and The Walking Dead are jumping in with a model where players buy land with real money, and then get a financial cut of anything that happens on that land.
There's Axie Infinity, which is apparently like Pokemon, but with the Pokemon being individual NFTs. The thing with it, though, is that you need to buy in. If you can't buy in, you can use a loaner Pokemon, but the owner of that Pokemon gets a cut of whatever you earn. This one was successful for a bit, but mostly by exploiting cheap foreign workers (a la WoW gold farming). The bottom seems to have fallen out now, though.
In either case, the schpiel is "get in early, so you can be the one on the top!"
Beyond that, there are also several hundred Techbro NFT games that are just godawful ugly clickers that mint NFTs and that's it. Picture the level of effort put into most NFT art and extend that to an entire game. Half of them cut and run as soon as they get the money. Follow Dan Olsen on Twitter, he's tracking them pretty well.
Cosmetic Microtransactions, but they're NFTs for some reason.
This is what Ubisoft is trying. The attempt is to have microtransactions in-game be NFTs instead of an entry in Sony's or Ubisoft's or whoever's database.
This one's just normal microtransactions with artificial scarcity. So, instead of people just buying/earning something because they want it, suddenly there's financial speculation involved. So, microtransactions but there's hoarding and scalping and fucking around with market valuation.
One thing that people often bring up as a benefit of cosmetic microtransactions being NFTs is that maybe someday they can be used across games. "Maybe" is doing a lot of work here, though.
There's a secret third implementation that was attempted but failed, too:
Kickstarter Rewards as NFTs.
Thus is the most nonsense one. The people making the new Stalker game tried to sell NFTs for getting your name in the game and getting your body scanned into the game and such. The weird part was, this would be non-transferable once the game was finished. So, the NFTs effectively held value until the release of the game, at which point they were just useless. It seemed like they were just jumping on the NFT bandwagon (and thr artificial inflation that would result from it) rather than running an auction or whatever.
The community outrage forced them to back down.
Summary.
In summary, NFTs are a land of contrasts. They're nothing more than a database entry, really, so actual in-game implementation depends on what the people doing the implementing want to get out of it. In most cases it's money, of course, so that's how things are going.