Effect of steroid hormone on specific cells?
The quick answer is that only certain cell types express the required steroid hormone receptors that are necessary to induce signaling and gene regulation when bound to their target steroid hormones, like estrogen, testosterone, cortisol, etc. If no receptor is present, the steroid doesn't effect any change.

The second part of the answer involves the particular signaling pathways induced by the ligation of certain receptors by certain classes of hormones. Testosterone, for example, has numerous effects across the body, from promoting the growth of hair to building muscle mass to effects on mental well-being. Testosterone and its primary metabolite 5α-dihydrotestosterone bind primarily to the cytoplasmic androgen receptor, which then translocates to the nucleus, binds DNA at hormone response elements, and alters the transcriptional activity of genes (either increasing or decreasing, depending on the gene and the cell type). Testosterone can also be metabolized to estradiol and bind estrogen receptors, which function similarly to the androgen receptor (although it can have DNA-independent effects as well).

So, depending on the cell type, receptor expression levels, other DNA regulatory elements, the presence or absence of various testosterone-metabolizing enzymes, and other factors like age, gender, etc., a single steroid hormone can have a multitude of effects throughout the body.