"I put the cup in the box."
You use 置く (おく) when you just lay something over a surface. When you mean you put something -inside- something else, you use 入れる (いれる).
Think of 置く as to place and 入れる as to insert.
置く (おく) appears to refer to placing something somewhere and leaving it in that state.
入れる (いれる) refers to placing it inside something.
I would guess because 入れます is if something is entering in something smaller like going into a cup or box or bag while おきます is to put down something. so 部屋にテーブルをおきます is saying I put the table DOWN in the room while this sentence is saying I put the cup IN the box.
That is a good way to remember it. Just note that size and direction do not really matter actually. e.g. Add salt to the soup would be スープにしおを入れます/put salt into the soup. Leave something outside would be 外に置きます.
How am I supposed to know that the English sentence is in the past tense and that using 入れます will be wrong?
I was looking through the comments to find an answer to the same question..
Is it important to distinguish that you're putting something IN the box? 箱の中? Or is "in" assumed to be the default if you don't say "on" or "under" or something?
In the case of 入れる it is not important. The verb means not only put, but put something into .