For better understanding ordinal numbers you need to know the difference between cardinals and ordinals. We use cardinal numbers when we count things (1, 2, 3 ect). An ordinal number is an adjective describing place of an object in certain order (this is my first lesson, that was our second date). So if ordinals are the same with adjectives – they should have the same endings. To make an ordinal number you need to take a cardinal number and to add one of these endings: -ый / -ая / -ое / – ые (depending on a gender of noun you’re describing).
Numbers 1st, 2d, 3d, 4th are exceptions so you have to memorize them.