What is a quark?
If you want to understand a quark star, you first need to know a little bit about elementary particles and quantum theory. An atom is composed of several different particles that each have unique properties like mass or charge. The center of an atom, the nucleus, is made of particles called protons and neutrons, and determines exactly which element the atom is. These protons and neutrons have similar masses, but while the proton has a positive electric charge, the neutron has no net electric charge. These charges work in the exact same way as magnets, since they both operate under the electromagnetic force. It's possible to think of a proton like a very small magnet, that feels an attractive force with particles of the opposite charge and a repulsive force with particles of the same charge. The electromagnetic force between two objects is carried by a third particle called virtual photons, which have no mass.
Protons and neutrons themselves are made up of even smaller particles called quarks, with one proton or neutron being composed of three different quarks. Each of these quarks feels the effects of the strong force, which is actually quite different from the electromagnetic force. Unlike electromagnetic charge, the strong force acts on quarks through color charge. This misleading name actually has nothing to do with the color of quarks, but more to do with the color theory we all learned in elementary school.
Instead of just two charges, the strong force has three charges: red, blue, and green. There are also corresponding anti-charges called anti-red, anti-blue, and anti-green. In a proton or neutron, three quarks can only come together if there is no net color charge, such as when a red, blue and green quark come together. The same can also happen for the anti-charges. You can even end up with a quark ending up with its corresponding anti-charge to form a particle, like a red and an anti-red. The strong force between quarks is carried through a particle called the gluon, which does have mass.