How are blocks accepted in bitcoin?
I am wondering weather there will be a scenario where the miners do not accept a valid block or accept a malicious block


The only scenario in which this would happen is if someone on the network is running a malicious version of code with different consensus rules. In this event, anyone running that code will accept an invalid block (that is valid according to their incorrect rules), causing a fork in the chain.

However, everyone on the network using valid consensus rules would deem each block of the forked chain as invalid, and continue extending the real chain as expected.