Most established airlines will promote from within their own First Officer base. Direct recruitment tends to occur when there is a demand that cannot be satisfied from this source, such as during a rapid expansion, or when any expansion would significantly deplete the overall experience level within this base. Similarly countries with a high demand and low supply base from the indigenous qualified population, may also source direct command recruitment from abroad.
First officers are recuited directly via a number of routes. For a major airline such as BA, this would comprise experienced pilots from other airlines, military career change pilots, and cadets placed or sourced from major FTO's specialising in such programmes.
I mean a lot of pilots send in their CVs to a lot of different airlines but does this actually ever work?
Yes, that is how most pilots are first assessed. Either from CV's submitted by post, or on-line. From these, a shortlist of candidates suitable for interview is constructed. The information contained in the CV needs to be relevant, meet the specified criteria, and be accurate.