The Conservatives  got 318 seats and the Democratic Unionists got 10 seats, giving them 328. Since the Northern Irish Sin Fein do not actually take their seats in the British parliament that gives them 6 more than the 322 actually needed to hold a majority. It isn't ideal but it is sufficient to get through Brexit. The DUP is further to the right and more pro Brexit than most in the Conservative party.