Sorry if this has been asked and I cannot find the information on Google.
After the war, how exactly did they force plantation and slave owners to free their slaves? I can imagine the majority wouldn't just simply turn them free due to new laws and the results of the war.
Also, did any slave owners ignore the emancipation proclamation and keep slaves in secret long after the civil war?
The Emancipation Proclamation was issued on January 1, 1863, declaring that slaves in (most) Confederate territory were immediately free. After that point, the Union army enforced it when they occupied territory. They usually didn't even need to do anything, as news of the Proclamation quickly spread and there weren't anywhere near enough overseers to force freedmen back to work once they knew the Union army was nearby. (Even before the Proclamation, planters in areas like eastern North Carolina were sending regular complaints to the Confederate government pleading for troops to be sent to patrol and stop their slaves from running away to the Union lines.)
That said, there were some exceptions. As I wrote several years ago on a similar question:
There were some who tried to hide news of emancipation from their slaves. Levine mentions incidents in Texas and Georgia, including one master who explained it by saying Lincoln's death had restored slavery. One African Methodist Episcopal missionary in Georgia said, even four months after Appomattox, "The people do not really know that they are free." This did eventually fail, one plantation at a time, without much fanfare. Levine quotes one newly-freed girl saying "We stayed [on the plantation] another year after freedom" until "we finally found out we were free and left." Sadly, though Levine doesn't speculate, it's unlikely she was the last to learn.