The major difference between them is that "二" is generally used when counting numbers (一、二、三,…), or performing mathematical computations. 两(liǎng) is used in front of measure words to express a quantity. For example:
两个苹果(liǎng gè píng guǒ) two apples
两张桌子(liǎng zhāng zhuō zǐ) two desks
两本书(liǎng běn shū) two books
两点钟(liǎng diǎn zhōng) 2 o’clock
"二" (èr) is also used as an ordinal number or in maths to indicate a numeral, a fraction, or a decimal. For example:
第二(dì èr) the second
二楼(èr lóu) the second floor
二分之一(èr fēn zhī yī) 1/2
零点二 (líng diǎn èr) 0.2
In the multi-digit numbers,
For tens place and ones place, we onLY use "二". Eg. 22(二十二)
Before the hundred(百), we can use either "两" or "二". e.g. 200(二百/两百).
When used before the thousand(千), ten thousand(万) or hundred million(亿), "两" is much more frequently used.
e.g. 2000(两千); 22222(两万两千二百二十二); 200,000,000(两亿)
When you want to say an approximate number, you can use "两". For examples
一两天(yī liǎng tiān) One or two days.
两三回 (liǎng sān huí) two or three times