What are the impediments to the priesthood?
This can be found within the Code of Canon Law, here is Canons in question for the Latin Church (as the Eastern Catholic Churches have their own canons though the impediments are the same just the number of the actual canon will be different).
Can. 1040 Those bound by an impediment are to be barred from the reception of orders. An impediment may be simple; or it may be perpetual, in which case it is called an irregularity. No impediment is contracted which is not contained in the following canons.
Can. 1041 The following persons are irregular for the reception of orders:
1° one who suffers from any form of insanity, or from any other psychological infirmity, because of which he is, after experts have been consulted, judged incapable of being able to fulfil the ministry;
2° one who has committed the offence of apostasy, heresy or schism;
3° one who has attempted marriage, even a civil marriage, either while himself prevented from entering marriage whether by an existing marriage bond or by a sacred order or by a public and perpetual vow of chastity, or with a woman who is validly married or is obliged by the same vow;
4° one who has committed wilful homicide, or one who has actually procured an abortion, and all who have positively cooperated;
5° one who has gravely and maliciously mutilated himself or another, or who has attempted suicide;
6° one who has carried out an act of order which is reserved to those in the order of the episcopate or priesthood, while himself either not possessing that order or being barred from its exercise by some canonical penalty, declared or imposed.
Can. 1042 The following are simply impeded from receiving orders:
1° a man who has a wife, unless he is lawfully destined for the permanent diaconate;
2° one who exercises an office or administration forbidden to clerics, in accordance with cann. 285 and 286, of which he must render an account; the impediment binds until such time as, having relinquished the office and administration and rendered the account, he has been freed;
3° a neophyte, unless, in the judgement of the Ordinary, he has been sufficiently tested.
Can. 1043 Christ’s faithful are bound to reveal, before ordination, to the Ordinary or to the parish priest, such impediments to sacred orders as they may know about.
Can. 1044 §1 The following are irregular for the exercise of orders already received:
1° one who, while bound by an irregularity for the reception of orders, unlawfully received orders;
2° one who committed the offence mentioned in can. 1041, n. 2, if the offence is public
3° one who committed any of the offences mentioned in can. 1041, nn. 3, 4,5,6.
§2 The following are impeded from the exercise of orders:
1° one who, while bound by an impediment to the reception of orders, unlawfully received orders;
2° one who suffers from insanity or from some other psychological infirmity mentioned in can. 1041, n. 1, until such time as the Ordinary, having consulted an expert, has allowed the exercise of the order in question.