How a principal bundle and the associated vector bundle determine each other
Solution 1:
Given a topological space $X$ and a natural number $n$, to each rank $n$ real vector bundle $E\to X$ corresponds a principal $GL(n,\mathbb R)$-bundle $P(E)\to X$, called the frame bundle of $E$; the fiber $P(E)_x$ over a point $x\in X$ is the set of linear isomorphisms $p:\mathbb R^n\to E_x$. The group $GL(n,\mathbb R)$ acts on $P(E)$ on the right by $g: p\mapsto p\circ g$.
In the other direction, to a given a prinicipal $GL(n,\mathbb R)$-bundle $P\to X$ associate the vector bundle $E(P)=P\times\mathbb R^n/G$, where $G$ acts on $P\times \mathbb R^n$ diagonaly by $(p,v)\mapsto (pg,g^{-1}v)$.
You need to verify many small (and easy) details for $P(E)$ and $E(P)$ to be precisly and well defined. The upshot is that the maps $E\mapsto P(E)$ and $P\mapsto E(P)$ induce a natural bijection between the set of equivalence classes of rank $n$ real vector bundles over $X$ and the set of equivalence classes of principal $GL(n,\mathbb R)$-bundles over $X$.
You can modify the above easily to complex vector bundles and manifolds.
So we see that vector bundles (real or complex) correspond to principal $G$-bundles, where $G$ is the general linear group (real or complex). You can extend the correpondence to include other groups $G$, by adding more structure on the vector bundle (orientation, euclidean metric etc).
This may give the impression that working with vector bundles or principal bundles is "basicaly the same", perhaps a matter of taste. This is not the case, and both concepts are essential. But this will take too long to explain, perhaps the subject of a seperate question (sorry).