Framing a wall is one of the most approachable carpentry projects, and the logic is the same whether it's a basement partition or a load-bearing wall. The difference is that load-bearing and exterior walls carry weight, so their sizing and connections matter much more — and they need a permit and inspection.
Plates and studs
A wall has a bottom plate, a top plate (doubled on load-bearing and exterior walls), and vertical studs between them. Studs are spaced 16 inches on centre for most walls, or 24 inches for some non-load-bearing walls, so standard sheet goods land on a stud.
Openings
Door and window openings need a header sized for the span and load above, supported by jack studs (trimmers) under each end and king studs alongside. Non-bearing partition openings need much less, but bearing walls must carry the load around the opening.
Plumb, square, and fastened
Build the wall flat, square it by measuring the diagonals, then stand it, plumb it, and fasten it to the floor, ceiling, and adjoining walls. Anchor bottom plates on concrete with the right fasteners, and check whether a moisture break is needed under plates on slabs.
Know if it's load-bearing
Never remove or alter a wall without confirming whether it carries load. Load-bearing walls support floors or the roof above, and removing one without proper beams and posts is dangerous. When unsure, consult an engineer.