What is the proper way to install/paint baseboard?
You would usually caulk the gap between the baseboard and the wall.  This is why I usually don't bother painting the trim before putting it up (unless I'm staining it).

Usually I would prime the wall first, then put up the trim, putty/caulk, paint the trim, then finally paint the walls.