The accusative case should be used when there is a DIRECT OBJECT in the sentence. It is usually what the verb is 'doing', for example, the dog ate the bone. The bone would be the object and, therefore, in German you would use the accusative case (Der Hund isst DEN Knochen).
However, there are exceptions! You should not use the accusative case if the object follows the verb 'to be' (sein) e.g. I am a boy. Instead, you should use the nominative case. So it would be 'Ich bin EIN Junge' instead of 'Ich bin einen Junge'.