The objects must have similar charges to repel each other. If both the objects are either positively or negatively charged then they will repel each other. However, a positively charged object will attract a negatively charged object. This is based on Coulomb’s law of attraction wherein similar charges repel each other and opposite charges attract each other.