"lehet" is a verb and as such it can be conjugated. Here are the forms of this verb in present:
lehetek, lehetsz, lehet, lehetünk, lehettek, lehetnek
In past, the conjugation goes like this:
lehettem, lehettél, lehetett, lehettünk, lehettetek, lehettek
"lehet", just like “can” in English, expresses possibility, permission and ability.
Examples for “possibility”:
1. Olyan jó, hogy nem lehet magyar = it's so good, that it cannot (possibly) be Hungarian
2. Hány éves lehet? = How old could (s)he (possibly) be?
Nem lehet 3o-nál több. = Cannot (possibly) be more than 3o.
3. (Someone judging someone's nationality by his accent) Francia lehet. = He's probably French.
Examples for permission: (in this case “lehet” is followed by an infinitive)
1. Itt nem lehet dohányozni. = You can’t smoke here./Smoking is not allowed here.
2. Ide nem lehet bemenned. = You can’t go in here.
3. Meg lehet kérdezni hány éves vagy? = Is it OK to ask you how old you are?
Examples for ability: (in this case „lehet” is followed by an infinitive)
1. Olyan köd van, hogy nem lehet semmit se látni. = It’s so foggy that you can’t see anything.
2. Ezt az ablakkot nem lehet kinyitni, mert elromlott a zár. = You can’t open this window because the lock is broken.
3. Ezt a asztalt szét lehet húzni, hogy nagyobb legyen. = You can pull this table apart to make it bigger.
I hope it somewhat clears things up about „lehet”.