We use Langevin simulations to study the sliding friction of two-dimensional colloidal particles on a substrate with randomly distributed point-like pinning centers. The colloidal particles are modeled to interact with each other through repulsive magnetic dipole and attractive Lennard-Jones potentials. The subsequent occurrence of superlubricity, wherein the average friction force equals to zero, is accompanied by the appearance of islands with clear boundaries in the microscopic colloidal structures for weak pinning substrates. Friction arises for strong pinning substrates, and the average friction force increases with the substrate pinning intensity, and further, the islands disperse into disordered plastic structures. Moreover, the average friction force decreases with the repulsion intensity between the colloidal particles, and superlubricity finally results when the repulsion becomes sufficiently strong. Superlubricity also occurs for sufficiently weak attraction between colloidal particles, with an increase in the attraction intensity between colloidal particles leading to a nonlinear increase in the average friction force. With increasing temperature, the average friction force firstly increases and subsequently decreases rapidly. The above results can provide a theoretical framework for biological self-organization via utilization of the friction properties of microscopic or mesoscopic colloidal systems.