Well, essentially, everything starts with the surface heating. The atmosphere itself does not really warm itself up - the main constituents of the atmosphere, nitrogen and oxygen, are relatively transparent to solar radiation. (Aside: Ozone and other greenhouse gases are not so, but they make up less than 2% of the atmosphere). However, the ground is very translucent, or nontransmissive, with solar radiation. When it begins to heat up, the air, through conduction at the surface and convection as the air mixes, begins to heat up and turn.
Refocusing on the question, let's look at a simple concept called the lapse rate. As you go up in the atmosphere, in general, the air cools due to there being less of it - by the ideal gas law, as pressure goes down at a constant volume, so does temperature. In general, the lapse rate tends to be about a degree Celsius per 200 meters of ascent. So, after a kilometer climb, you would feel about 5C cooler.
Keeping this in mind, remember that cooler air is more dense than warmer air. As air is a fluid, the denser warm air wants to rise, with the cooler air descending. For the most part, when the air is stable, the process is evened out. However, most "exciting" weather, or thunderstorms and rain, come when cooler air overlays warmer air, taking into account the lapse rate I mentioned above.
Now, if you think about it, surface heating will tend to warm the air even more through conduction, and thus, it will create more vigorous overturning, or convection. Looking through a parcel of air that is going up, sort of like a bubble going from the bottom of a pot of boiling water, if the parcel is warmer than its surroundings, it will continue to rise. Since the lapse rate is fairly well-established, if you can make the parcel warmer or the airmass at the bottom warmer, it will continue to rise through the atmosphere until its energy (or density) makes it slow down.
(Sorry if this is a long answer, but it's important to follow all of the steps in it.)