Basically, any time someone claims they put money into your bank account, or send you a check, or something similar, and then asks you to send money to someone else, it is a scam. What you need to do: 1. Under no circumstances whatsoever must you ever send money to anyone. 2. Talk to your bank and ask them for advice.
The money that gets put into your bank account isn't real. It has been paid with a forged check, or a stolen credit card number, or a hacked or faked bank account. Your bank will figure this out eventually, and then they will take that money away. It may take many weeks, but the money will disappear.
Meanwhile, any money that you send to someone is real. It's your money. When you send it, it is gone. Your bank will hold you to that.
So in your case if they say they pay you $6,000 for a job, but put $10,000 into your bank account and ask you to pass $4,000 on to someone, the $4,000 you pay comes out of your bank account, a long time later the $10,000 comes out of your bank account, and you owe the bank $4,000. Plus sometimes the job involves real work that obviously doesn't pay.
An alternative is that this is money laundering, in which case you would become a criminal by being involved.