How can AES be considered secure when encrypting large files? Why is AES considered to be secure when encrypting large files since the algorithm is a block cipher?

I mean, if the file is larger than the block size, the file will be broken down to fit the blocks. Then the same key is used to encrypt each block of the file. And as I know it, using the same key to encrypt multiple messages/blocks is not a good idea. Is not that how AES works?

Or do I have misunderstood something? :-)
Encrypting big amounts of data is no problem for block cipher - if you remember a few important things.

You can't encrypt plaintext which is bigger than the block size. You need to do some addition work. Most cipher operation modes first divide the plaintext into blocks of the size of the cipher. Now you can do different things: How about just encrypting each individual block, plain and simple? That's called ECB mode.

What happens if you encrypt the same block twice at different positions in a file? You get the same cipher text. If an attacker sees this, he can tell: "At this two positions there's the same plaintext." - The attacker could also swap two blocks without it being detectable (at least if the decrypted plaintext still makes sense).

Then there's the CBC mode. You first xor an Initialization vector (IV) with the first plaintext block. The IV should be randomly generated and has to be as big as the block size. Now you encrypt the resulting block. This is your first ciphertext block. As next step, you xor this first block with the next plaintext block. Block cipher algorithms create mostly random looking blocks after encryption and as a result, the xor of this and a plaintext block creates a new block to encrypt. This removes the two mentioned problems of the ECB mode: Swapping two blocks results in at least one garbage plaintext block. Also the same plaintext block will (in nearly every case) encrypt into different ciphertexts.

There are many more encryptions modes like the Counter mode (CTR). Also you should normally use some kind of Authenticated encryption. The use of a good cipher mode is not enough to avert most attacks. Things like a Message authentication code (MAC) are also important. A commonly used, but pretty complex way of combining both ways is the Galois/Counter Mode.