With PoS you are probably refering to Proof of Sta
ke ?
In PoW miner try to generate a valid block (whose hash is below a specific value (determined by the difficulty)).
The first to generate a valid block can publish it.
In PoS the stake does determine who will be chosen to append the next block to the blockchain.
The reason I want to understand POS is i am going to create a big project and i need to understand everything in very deep deep down.
You shouldn't start a project on your own if you don't actually know how everything works in detail.
If you are serious about creating a new (non shit-)project, hire a competent developer team.