How is it possible to know whether a particular solvent will dissolve in a particular kind of solvent, i.e. organic, polar, protic...? Are there any indicators to look for in molecules or elements that allow one to predict what kind of solvent should be used to dissolve it?
There are some general guesses one can make from looking at the structure but the Abraham solvation equation is commonly used to estimate the solubility of a compound in a given organic solvent: $$\log P_s = c + e E + s S + a A + b B + v V$$ This equation relies on a set of descriptors to characterize the properties of solvents and solutes to give the water/solvent partition coefficient $P_s$ (the ratio of the solubilities in water and solvent, under certain assumptions):
$p,e,s,a,b,v$ are coefficients that describe the solvent. Abraham and coworkers have collected coefficients for 85 different solvents.
The other variables are descriptors of the solute:
$E$ is the excess molar refractivity, which is a measure of the polarizability of a molecule.
$S$ is the solute dipolarity/polarizability.
$A$ is the overall (summation) hydrogen bond acidity.
$B$ is the overall (summation) hydrogen bond basicity.
$V$ is the McGowan characteristic volume.
You can look at the paper if you want to know exactly what these descriptors are, but their values can be obtained through various experimental and computational means, and combined with the solubility in water, used to estimate the solubility of a given compound in an organic solvent.
Fortunately, you don't have to do all this by hand as several websites, like this, that offer lookup and computation where you only have to specify a compound and pick a solvent from a list.
In general, organic compounds tend to dissolve well in solvents which have similar properties to themselves. So polar molecules tend to dissolve well in polar solvents, apolar molecules in apolar solvents. The solubility is affected strongly by the type of intermolecular forces between the two molecules.
For example benzene and hexane are highly miscible because they are both apolar and interact via Van der Waals forces. In general molecules with large hydrocarbon chains or rings will be soluble in apolar solvents.
A big indicator to look for in molecules is the presence of highly polarised bonds, in particular N-H, F-H and O-H bonds which are able to engage in hydrogen bonding. Protic solvents (those with N-H, F-H and O-H bonds) will form H-bonds with other protic molecules leading to them tending to be very soluble. H-bonding can also occur between protic hydrogens and other highly negatively charged atoms such as the oxygen atom in a carbonyl group and so this leads to protic solvents generally being good at dissolving any significantly polar molecule. For example propanone is soluble in water due to the hydrogen bonding between the water hydrogens and the carbonyl oxygen in propanone.
Polar aprotic solvent such as dimethylsulfoxide (DMSO) are generally miscible with polar protic and many apolar solvents and are similarly able to dissolve a wide range of molecules. After consulting several data sources it seems that DMSO and other similar polar aprotic solvents are miscible with all but the most apolar hydrocarbons and I would assume that they will also dissolve many different organic solids.
In general when looking at molecules to decide which solvent to dissolve them in you need to evaluate what the primary intermolecular interactions will be with that molecule (In particular H-bonding or Van der Waals) and then choose a solvent which has similar properties.
I haven't talked about entropy at all in this answer because I am not entirely confident that I can explain all of the relevant factors that affect it but for dissolving crystalline solids in particular that is also something that you have to take into account but I will leave that to someone more knowledgeable that me to answer.