Do you want the right way...or the McGyver way? lol...you could use paper clips and bubble gum....but if you want a non McGyver way...
I'm not actually sure what the CORRECT way is...but...I'm assuming you are painting them? If so, the quick and dirty way would be to use a counter sink bit, attach it to the wall with drywall screws, fill the hole with wood filler, then sand and paint and youre done.
Another easy option, if you are sure you dont want to move them later, would be to use adhesive, like liquid nails, and then tac them in place with the longest finish nails you have...probably 2" if you've got them. Then you only have a small hole to fill. Once the adhesive sets up, theyll be solid enough to hold anything reasonable. You'll want to scuff the surfaces you're gluing too first.
BTW, all this is assuming that from the base up, you are setting on the floor...not actually hanging them.
As far as attaching them together, again...glue and finish nails work here too, If you have inconspicuous areas you can use the counter sink method, and not even worry about filling them. Another option for attaching them together is pegs and wood glue....any home improvement store will carry little wood pegs for that exact application. Drill the appropriate sized hole opposite each other on each piece and glue them in place.
I'm sure theres probably better ways of doing it...but in the interest of "get it done" which has been my motto for 3 years now...those should work.