It means you would admit to something that you did that you maybe shouldn’t have done. It means that you are admitting your guilt.
For example- When you were a child, you might have accidentally broken something that belonged to your mother. You hoped she wouldn’t notice, so you didn’t tell her. Then when she found out and asked you if you broke it, you ‘owned up to it’ and said yes, even though you knew she would be angry with you.