Hi, what does depend the mining difficult? By the number of people that are mining?
The difficulty is dependent on the time it took to find 2016 blocks. Ideally, it should take 20160 minutes (10 minutes on average between each block; Exactly 2 weeks) to find 2016 blocks. After 2016 blocks, the difficulty is adjusted in order to keep the time between blocks to be 10 minutes on average. It changes as more or less hash power is added and removed from the network.
In a future, when mining will end, or will be less earning... Does the actual big mining farm close giving to citizien back the power of mining?
Mining will never end, the block reward will though. Around 2140, if blocks are generated according to the plan, then the block reward will become zero. By this time (before in fact) there should be enough transactions on the Bitcoin network to make up for the block subsidy so miners will still be making money.