Broadly speaking the best places to start are corners and first reflection points (any flat surface where you could put a mirror and see your speakers) but really we'd need more info about your room size and shape, and, of course, what you mean by foam.
Take a stroll through the studio building forum. There's a lot of info there.
Yeah, sometimes I'm quick and short....and that's just my answers....
But when I'm at work, I often can't type much. The thing is that foam doesn't do anything for low frequencies, and low frequencies are 99% of the problem 99% of the time. What you need is the proper materials like home insulation, rigid fibreglass, etc....When I have more time later on, I'll try post a link of a video showing someone making their own bass traps, don't have time right now.