Depuis, pendant, and il y a all relate to time but aren't interchangeable. Depuis (since/for) pairs with the present tense to describe an action still ongoing: j'habite ici depuis trois ans (I've been living here for three years — and I still do), a construction that trips up English speakers used to a present perfect ("I have lived").
Pendant (for/during) describes the duration of a completed or bounded action, often in the past: j'ai habité à Paris pendant trois ans (I lived in Paris for three years — implying I no longer do). Il y a, placed before a duration, means "ago": je suis arrivé il y a trois ans (I arrived three years ago).