Soo Hello
Well in the castle you're not able to jump but in the small world in the painting you can! You can enter them by pressing the Space button while you're touching the paintings (also you're able to speak with toads or punch/kick by pressing the Z button) and you can jump in them by pressing the Up button. Also you can walk on stairs with the Up and Down Button and you can enter Doors by pressing the Up button.
Thanks for Asking!