edit the html page where you call the ckeditor instance.

CKEDITOR.replace('editor',
{
filebrowserUploadUrl:'/path/to/upload/script.php';
});

the line above will display the upload from whenever user click on the image icon.
the upload script should return

<script type="text/javascript">
window.parent.CKEDITOR.tools.callFunction(1, '<url of uploaded file>', '');</script>


ckeditor external file uploader

ckeditor image uploader problem