imperative means that you command how the program should do things:
var i = int[5];
for (int x = 0; i < 6; i++) {
i[i] = 0;
}
declarative just means you declare what you want to have
var i = int[]{0...5};
so one time you can be really precise on what should be done on every step and every move
and the other time you can just describe what you want to have without to worry what's going on inside.
one perfekt example for declarative programming languages is SQL you actually never care how the data gets fetched you just say "SELECT * FROM table INNER JOIN table2 ON table1.id = table2.table1_id; "
a perfekt example for imperative languages is C ... you basically have to explain everything step by step to the computer.