If I know the market demand is p= 39 -.5y and profit for an individual firm is R(p) = p^2 -2p -925

what is y(p) and the long-run equilibrium y* and J* where J* is the number of firms in the market?

I don't understand the difference between y(p) and the y*. Any advice/explanations really, really appreciated.