We can assume that everything is over the complex numbers.
Let $ U $ be a scheme and $ G $ an (affine) algebraic group. Let $ \pi: P \rightarrow U $ be a principal $ G $-bundle. Suppose $ X $ is another scheme with an action $ a : G \times X \rightarrow X $ of $ G $ on $ X $. Then one can construct the associated $ X $-bundle on $ U $, denoted $ \eta : P \times_G X \rightarrow U $ and here is where I will be sloppy - the scheme $ P \times_G X $ is constructed as a quotient of $ P \times X $ by the $ G $-action $ g \cdot (p,x) := (pg^{-1}, gx) $ and $ \eta(p,x) = \pi(p) $ is well defined.
A special case of this construction is when $ X = \mathbb{A}(V) $ is the affine space associated to a finite dimensional vector space $ V $ and the action $ a $ gives a representation of $ G $. In that case, we get the associated vector bundle $ P \times_G \mathbb{A}(V) \rightarrow U $.
All this is easy if we were in the category of topological spaces but my question is in the part where I was sloppy: Why does the quotient exist in the category of schemes? Are there some conditions on $ G,X $ that we need to assume beforehand? I know vaguely that from GIT, we can do it if $ G $ is reductive(?), but a complete answer or a reference where this construction is carried out carefully will be appreciated.