"Я ем яблоко, а она ест хлеб."
Перевод:I eat an apple and she eats bread.
"и" introduces the idea of similarity, appending "more of the same". "а" is an analogue of "and" but with a sense of contrast, introduction of something new or unexpected (even if it is a purely narrative , like "you didn't think I was going to say that").
From a practical point of view:
use "а" in questions when prompting to say something about something else ("and you, what did you say?"). Examples: "А ты?" = And you? , "А она что сделала?" = And what did she do? (then, after something else happened), "Я Аня. А тебя как зовут?" = I'm Anya. And what is your name?
"A does X, and B does Y". Typically in Russian this forces you to use "а", because actions X and Y are different. Thus, you inevitably show that A and B are engaged in different activities. May be different when the actions are not independent ("I am singing, and she likes it" — here "and" expands information on "singing" rather than just saying something about an activity of another person)
- someting like "I can say that X is/does Y, and Y is certainly Z", i.e. narrative that plays with the idea of "wait, there is more": "За этим домом банк, а как раз за банком — улица" = There is a bank behind this building; and behind the bank — that's where the street is.
- "A is X, (and) not Y": "Я художник, а не веб-дизайнер" = I am an artist, not a web designer. You can also say it like "I am not X, but Y". "А" still stays.
The difference from но "but" is that the contrast and opposition of "а" are subjective, i.e. more of a speech device than a real contradiction or any incompatibility. Of course, native speakers tend to use this speech device in certain patterns. Thus it sounds weird if you suddenly use "и" there or use "а" where "contrast" is hardly justified. However, sometimes it means that you CAN use "и" or "но" instead, and it still sounds OK, just maybe has a slightly different tone or message.