Work your magic. If you can handle the crying and your baby can self soothe, at around the 4th month of life, giving them love and getting them to bed at an early consistent hour can work wonders. You can leave them to cry (heartbreaking for many) for increasing amounts of time until they get to sleep. An alternative will be to remain with them cribside, gently supporting them, until they fall asleep.
You can do it! It can be really difficult. This is why there are so many books on the subject. Oh, the frustration for all us parents. Different babies require different needs. Some babies seem to be born sleepers. Bless you if you have the luxury. The best thing to do is to decide what you want as an end result and make a plan to get there. It can take days or weeks. Just be consistent in your actions.