Wooden shelf with flat brackets?
They probably have a few names, but I've always called them shelf cleats.

There's no real trick to them...they are exactly as you describe: strips of wood attached to the wall for a board (the shelf) to rest upon.

You typically want them on 3 walls, though (sides and back). Without the back cleat, your shelf will likely sag with any weight on it. 

Make sure they are anchored through wall into the studs. 

I will often add a piece to the front of the shelf the same depth as the cleats to give the front of the shelf a finished look and also strengthen the shelf.