How are prices calculated? Confused - Help please

Hello all,

I am wondering, how do the prices of the market actually get made, for example, if your using a broker, aren’t they not just making the figures they want, and can change them to anything at anytime?

And they know what prices your buying and selling at, so if they wanted they could stop you out whenever they chose?

Is there anyway to trade, safely? against figures which could never be manipulated?

What exactly are the figures, just plucked out of the air, who prices currency? how?

I know there are fundamental factors which move the prices, but still how are the prices chosen, even by this information?